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=-15.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 635EEC433E9 for ; Tue, 9 Mar 2021 14:04:06 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D2B2B650FD for ; Tue, 9 Mar 2021 14:04:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D2B2B650FD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=6fcaLaGRr9K2h3ASLS9165LXIBkE8wjkbDUS3CVaJfE=; b=HgTAnBp9BVXkfxUvJq2Vkr9nJ mO1ermbCoC4M84/Cxntk35nhEg5cdGrPmMH94xwZqmLmlqwnPs9eiVSYdV7JHDq1apN/WrOAFVwVx BNIXoZOUSJzvjp6WKt77uXeO8S7FkfEjfAPpSZpx4JVdO6Tms6LCsa95d0QrkWj4D1v93LqYHwvUR yaEhGPFfAIW6itrZvCCt8AzuXuT5ZgKLamWd+xFEbKHVOZvrWdcosaxtzuHJHmNLpXBMDWHIWe3Eh rESSimmhVfzc3wdlb9AMUnAMX3mbFCtgbOYBOlapLO5ktxmgyowMWCRUEYHibxBAjISNwnjCm8fF2 NOmZisJuw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lJcwD-004nmB-8Q; Tue, 09 Mar 2021 14:02:18 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lJcw3-004nls-Rh for linux-arm-kernel@lists.infradead.org; Tue, 09 Mar 2021 14:02:10 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id D91DA6509B; Tue, 9 Mar 2021 14:02:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615298524; bh=mVmvzbUnC1iFIvL06ompUep0zuEOPa7esezXGaZR3xs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=M1TPzKY9K3PDhx5XL6nTaNgm9qKBWf0xAIkdNin5oagRpNtVWCtiwFANJXtXuCx2g 2oG23QrNOefEahGmYa3323KlT37yZ0CDUZTtrsKJOvpijl7w9ru41ZxChMLAeNIPpJ 1yVRUz4n76cDsKGHbZsbggS01ak8pYRm1+izGodcDxeQel4swB45cVAoLsd3IAYvem ud/W5TK9T4DKUlDBeu1lLyhLJA8A2Bhvzi+stEbryMPh3KRKmzPweiUIHbQnxfWwQZ cs6O+Uy6usYceXKVxWLuEZ25TYp3JoL7n/WGOHM+D3hPPpFQqUcYYOhyxEiDISP6BT cPESkBi2qgWvA== Date: Tue, 9 Mar 2021 14:01:59 +0000 From: Will Deacon To: Pingfan Liu Cc: linux-arm-kernel@lists.infradead.org, Catalin Marinas , Greg Kroah-Hartman , "Rafael J. Wysocki" , Atish Patra , linux-kernel@vger.kernel.org Subject: Re: [PATCH] drivers/arch_numa: remove rebudant setup_per_cpu_areas() Message-ID: <20210309140159.GA28395@willie-the-truck> References: <20210309102138.41170-1-kernelfans@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210309102138.41170-1-kernelfans@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210309_140208_793381_AAFE8B81 X-CRM114-Status: GOOD ( 21.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org [typo in subject "rebudant"] On Tue, Mar 09, 2021 at 06:21:38PM +0800, Pingfan Liu wrote: > There are two identical implementations of setup_per_cpu_areas() in > mm/percpu.c and drivers/base/arch_numa.c. > > Hence removing the one in arch_numa.c. And let arm64 drop > HAVE_SETUP_PER_CPU_AREA. > > Signed-off-by: Pingfan Liu > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Greg Kroah-Hartman > Cc: "Rafael J. Wysocki" > Cc: Atish Patra > Cc: linux-kernel@vger.kernel.org > To: linux-arm-kernel@lists.infradead.org > --- > arch/arm64/Kconfig | 4 ---- > drivers/base/arch_numa.c | 22 ---------------------- > 2 files changed, 26 deletions(-) > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index 1f212b47a48a..d4bf8be0c3d5 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -1022,10 +1022,6 @@ config USE_PERCPU_NUMA_NODE_ID > def_bool y > depends on NUMA > > -config HAVE_SETUP_PER_CPU_AREA > - def_bool y > - depends on NUMA > - > config NEED_PER_CPU_EMBED_FIRST_CHUNK > def_bool y > depends on NUMA > diff --git a/drivers/base/arch_numa.c b/drivers/base/arch_numa.c > index 4cc4e117727d..23e1e419a83d 100644 > --- a/drivers/base/arch_numa.c > +++ b/drivers/base/arch_numa.c > @@ -167,28 +167,6 @@ static void __init pcpu_fc_free(void *ptr, size_t size) > { > memblock_free_early(__pa(ptr), size); > } > - > -void __init setup_per_cpu_areas(void) > -{ > - unsigned long delta; > - unsigned int cpu; > - int rc; > - > - /* > - * Always reserve area for module percpu variables. That's > - * what the legacy allocator did. > - */ > - rc = pcpu_embed_first_chunk(PERCPU_MODULE_RESERVE, > - PERCPU_DYNAMIC_RESERVE, PAGE_SIZE, > - pcpu_cpu_distance, > - pcpu_fc_alloc, pcpu_fc_free); This doesn't look identical to the version in mm/percpu.c -- that one passes NULL instead of 'pcpu_cpu_distance' and tries to allocate the pcpu memory on the relevant NUMA nodes. In fact, if you could remove this function, you could probably remove the whole HAVE_SETUP_PER_CPU_AREA block here as the other functions are just used as helpers. So I'm not sure this is valid. Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel