Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp704546img; Tue, 26 Feb 2019 07:16:29 -0800 (PST) X-Google-Smtp-Source: AHgI3IZsCKOSdnifRL3pWVuAHP56Ii7NbDgqN0MDuBr6ffGfvsGOrnkWdBEgfe+OZ6zWHhTy6KFE X-Received: by 2002:a63:df09:: with SMTP id u9mr24769547pgg.299.1551194189394; Tue, 26 Feb 2019 07:16:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551194189; cv=none; d=google.com; s=arc-20160816; b=XM41rX0xaU+PgCKPbPV5fA/l3qr+Otkm7HLHHZ7GeQjXz2Xi2mPXDQ39SXNeZgHNHl rbLR/mPt6VGi7GlnIVDNeHjSQHiemFasZEqLLYfEC+J7NUyMRjhThCPENlD7A6LUCk3O iHr0vU0yOBoUpm9jekt6srLa+WSdFDGV96X/SK9/ZYLEFjP/9BaVIQWjs/DCmRnzpLNu eoYpS1wa0g1G+6HWDvtcnPj6d6fY9qAPG7nsa+qbn4THmMT17F64uAZvnMcbHdyLrmGx UajQHzTmIPZBmo77u09tDKYobRsXdC7qVoOPDQHYmTkB8LrEDXUIVjCLnDOpyA2FXYZQ BVqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:feedback-id:mime-version:user-agent :references:message-id:in-reply-to:subject:cc:to:from:date :dkim-signature; bh=45Qew3QBnmu7ojYaW6YmM69wuPKibVm0GTOcIA8Iu7Q=; b=Yj0+dQcJmN/egH4D3rVhTrWsWhrQ1MvurBTCtITrh1zbliZoho+TT0Cw5fXWJu8ck2 cST6ldFN9X7XAyBNqyHlnHryg+x48ZD+iGFg4c9ZQoFzfesj0OSXHVj33R+ZlGkDdXuu zNwo4XfR22WQTvA0cMlC1w953bPRVt9QWTBPBc0DmNG7p4S4rWaP4HqWDWIG+A00Yi+1 9qMlNR7kr+DZ9X3WA6R3fr6Ab5cz0TBA6O/+xZgm7MzUHnaLSKkt96iK13hFBll+1FG8 /ghRli/u8ZV8FZdkle7n9qhEZgBh9+Vgkw6D0o90iWoKudcg6LF4hoWIZpXgfAB4e8Zw 2ycw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazonses.com header.s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug header.b=JuyoTIIc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j7si12362126pll.121.2019.02.26.07.16.14; Tue, 26 Feb 2019 07:16:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amazonses.com header.s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug header.b=JuyoTIIc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727239AbfBZPPw (ORCPT + 99 others); Tue, 26 Feb 2019 10:15:52 -0500 Received: from a9-32.smtp-out.amazonses.com ([54.240.9.32]:48736 "EHLO a9-32.smtp-out.amazonses.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726222AbfBZPPv (ORCPT ); Tue, 26 Feb 2019 10:15:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=ug7nbtf4gccmlpwj322ax3p6ow6yfsug; d=amazonses.com; t=1551194150; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:MIME-Version:Content-Type:Feedback-ID; bh=PLVgO+c/ksXQb0z1YKKNh9eSmG21/bkZ8P7aGZVkmZE=; b=JuyoTIIcD8txoIZN2v41dqigGwuCwFeamHQYH1nFqXaLUN6ydM49m8YpFEO1SW/V fS5QE5vWi9q9Edfw/orCnpJeZugTmcjKEix+fxI9r4jk+bE2EKkKw4ao5sviXIZHQRQ vdMUA5jYCL1JzaULPCIgrIMBqQG2rBy5/xcfNGIY= Date: Tue, 26 Feb 2019 15:15:50 +0000 From: Christopher Lameter X-X-Sender: cl@nuc-kabylake To: "dennis@kernel.org" cc: Peng Fan , "tj@kernel.org" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , "van.freenix@gmail.com" Subject: Re: [PATCH 2/2] percpu: km: no need to consider pcpu_group_offsets[0] In-Reply-To: <20190225151616.GB49611@dennisz-mbp.dhcp.thefacebook.com> Message-ID: <010001692a605709-407cf476-e7b6-43be-8551-66c54059e92f-000000@email.amazonses.com> References: <20190224132518.20586-1-peng.fan@nxp.com> <20190224132518.20586-2-peng.fan@nxp.com> <20190225151616.GB49611@dennisz-mbp.dhcp.thefacebook.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-SES-Outgoing: 2019.02.26-54.240.9.32 Feedback-ID: 1.us-east-1.fQZZZ0Xtj2+TD7V5apTT/NrT6QKuPgzCT/IC7XYgDKI=:AmazonSES Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 25 Feb 2019, dennis@kernel.org wrote: > > @@ -67,7 +67,7 @@ static struct pcpu_chunk *pcpu_create_chunk(gfp_t gfp) > > pcpu_set_page_chunk(nth_page(pages, i), chunk); > > > > chunk->data = pages; > > - chunk->base_addr = page_address(pages) - pcpu_group_offsets[0]; > > + chunk->base_addr = page_address(pages); > > > > spin_lock_irqsave(&pcpu_lock, flags); > > pcpu_chunk_populated(chunk, 0, nr_pages, false); > > -- > > 2.16.4 > > > > While I do think you're right, creating a chunk is not a part of the > critical path and subtracting 0 is incredibly minor overhead. So I'd > rather keep the code as is to maintain consistency between percpu-vm.c > and percpu-km.c. Well it is confusing if there the expression is there but never used. It is clearer with the patch.