From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E928BC48BCF for ; Mon, 7 Jun 2021 09:31:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5D0B6611C2 for ; Mon, 7 Jun 2021 09:31:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5D0B6611C2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E44486B0078; Mon, 7 Jun 2021 05:31:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DF43F6B007B; Mon, 7 Jun 2021 05:31:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C1FFF6B007D; Mon, 7 Jun 2021 05:31:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0021.hostedemail.com [216.40.44.21]) by kanga.kvack.org (Postfix) with ESMTP id 8A4136B0078 for ; Mon, 7 Jun 2021 05:31:37 -0400 (EDT) Received: from smtpin40.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 2FFE68249980 for ; Mon, 7 Jun 2021 09:31:37 +0000 (UTC) X-FDA: 78226410234.40.E66E72B Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) by imf07.hostedemail.com (Postfix) with ESMTP id 326BDA00014E for ; Mon, 7 Jun 2021 09:31:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=MlvkgxFcyawWgLbaD1anFAhejhA4mPswAd0WEOPLbd0=; b=cetr6/k8ZHIlURSNkBDEkxOd3 puNo+HwooQUeJn9AaPBl4regJ9NkcXwohGBb5OPUoX7XTTODh5d6IsuhC8Hnw3taLmVn0F8+4hF1o ArioCmyKCJRUZ5c5W9Ct8Cw0Zpb4xNWdK87xHBWnc3daFNyrTg9aLL7A/E6TbbFPNgdTXMtoLpPh1 VNTboFgYQtPgYxGziLgboqSm+C9rc0zETM+h5ZE5kg+2kGPOkoZAIe8MZfd5JZNTDNazJFXr/S6Gm YDi+dqX3d1L4b71QKMOqk7jvcXPp8QSgQdX3C28GtCjdiTWKtuBWWAYuFwAi7GnVSCXRZB8Zx7iVW ALDutps2w==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:44784) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lqBbS-0000Eu-Fv; Mon, 07 Jun 2021 10:31:26 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1lqBbN-0005oE-UB; Mon, 07 Jun 2021 10:31:21 +0100 Date: Mon, 7 Jun 2021 10:31:21 +0100 From: "Russell King (Oracle)" To: Christophe Leroy Cc: Kefeng Wang , Mike Rapoport , uclinux-h8-devel@lists.sourceforge.jp, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org, linux-csky@vger.kernel.org, linux-mm@kvack.org, linux-m68k@lists.linux-m68k.org, openrisc@lists.librecores.org, Andrew Morton , linux-snps-arc@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 00/15] init_mm: cleanup ARCH's text/data/brk setup code Message-ID: <20210607093121.GC22278@shell.armlinux.org.uk> References: <20210604070633.32363-1-wangkefeng.wang@huawei.com> <481056ab-686e-9f42-3b8a-b31941f58af6@huawei.com> <006eb573-5a20-1ac7-6234-338d11346a08@csgroup.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <006eb573-5a20-1ac7-6234-338d11346a08@csgroup.eu> User-Agent: Mutt/1.10.1 (2018-07-13) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=armlinux.org.uk header.s=pandora-2019 header.b="cetr6/k8"; spf=none (imf07.hostedemail.com: domain of linux@armlinux.org.uk has no SPF policy when checking 78.32.30.218) smtp.mailfrom=linux@armlinux.org.uk; dmarc=pass (policy=none) header.from=armlinux.org.uk X-Stat-Signature: pdnt1t9m84i1t5i8um8f1nzjyofw7xbh X-Rspamd-Queue-Id: 326BDA00014E X-Rspamd-Server: rspam06 X-HE-Tag: 1623058294-493550 X-Bogosity: Ham, tests=bogofilter, spamicity=0.008293, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Jun 07, 2021 at 07:48:54AM +0200, Christophe Leroy wrote: > Hi Kefeng, > > What you could do is to define a __weak function that architectures can > override and call that function from mm_init() as suggested by Mike, The problem with weak functions is that they bloat the kernel. Each time a weak function is overriden, it becomes dead unreachable code within the kernel image. At some point we're probabily going to have to enable -ffunction-sections to (hopefully) allow the dead code to be discarded. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!