linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dennis Zhou <dennis@kernel.org>
To: Christopher Lameter <cl@linux.com>
Cc: "dennis@kernel.org" <dennis@kernel.org>,
	Peng Fan <peng.fan@nxp.com>, "tj@kernel.org" <tj@kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"van.freenix@gmail.com" <van.freenix@gmail.com>
Subject: Re: [PATCH 2/2] percpu: km: no need to consider pcpu_group_offsets[0]
Date: Tue, 26 Feb 2019 11:31:51 -0500	[thread overview]
Message-ID: <20190226163151.GA47262@dennisz-mbp.dhcp.thefacebook.com> (raw)
In-Reply-To: <010001692a605709-407cf476-e7b6-43be-8551-66c54059e92f-000000@email.amazonses.com>

On Tue, Feb 26, 2019 at 03:15:50PM +0000, Christopher Lameter wrote:
> 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.
> 

Okay. I'll apply it with your ack if that's fine.

Thanks,
Dennis


  reply	other threads:[~2019-02-26 16:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-24 13:13 [PATCH 1/2] percpu: km: remove SMP check Peng Fan
2019-02-24 13:13 ` [PATCH 2/2] percpu: km: no need to consider pcpu_group_offsets[0] Peng Fan
2019-02-25 15:16   ` dennis
2019-02-26  0:03     ` Peng Fan
2019-02-26 15:15     ` Christopher Lameter
2019-02-26 16:31       ` Dennis Zhou [this message]
2019-02-25 15:13 ` [PATCH 1/2] percpu: km: remove SMP check Dennis Zhou
2019-02-25 23:58   ` Peng Fan
2019-02-26 15:16   ` Christopher Lameter
2019-02-26 17:03     ` Dennis Zhou
2019-02-27 13:02       ` Peng Fan
2019-02-27 16:41         ` Dennis Zhou
2019-03-03  8:49           ` Peng Fan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190226163151.GA47262@dennisz-mbp.dhcp.thefacebook.com \
    --to=dennis@kernel.org \
    --cc=cl@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=peng.fan@nxp.com \
    --cc=tj@kernel.org \
    --cc=van.freenix@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox