Re: [RFC] percpu: decrease pcpu_nr_slots by 1

2019-02-27 Thread Dennis Zhou
linux...@kvack.org; > > linux-kernel@vger.kernel.org; van.free...@gmail.com > > Subject: Re: [RFC] percpu: decrease pcpu_nr_slots by 1 > > > > On Tue, Feb 26, 2019 at 12:09:28AM +, Peng Fan wrote: > > > Hi Dennis, > > > > > > > -Original Mes

RE: [RFC] percpu: decrease pcpu_nr_slots by 1

2019-02-27 Thread Peng Fan
t; > > To: Peng Fan > > > Cc: t...@kernel.org; c...@linux.com; linux...@kvack.org; > > > linux-kernel@vger.kernel.org; van.free...@gmail.com > > > Subject: Re: [RFC] percpu: decrease pcpu_nr_slots by 1 > > > > > > On Sun, Feb 24, 2019 at 09:17:08AM +

Re: [RFC] percpu: decrease pcpu_nr_slots by 1

2019-02-26 Thread Dennis Zhou
rg; > > linux-kernel@vger.kernel.org; van.free...@gmail.com > > Subject: Re: [RFC] percpu: decrease pcpu_nr_slots by 1 > > > > On Sun, Feb 24, 2019 at 09:17:08AM +, Peng Fan wrote: > > > Entry pcpu_slot[pcpu_nr_slots - 2] is wasted with current code logic.

RE: [RFC] percpu: decrease pcpu_nr_slots by 1

2019-02-25 Thread Peng Fan
Hi Dennis, > -Original Message- > From: den...@kernel.org [mailto:den...@kernel.org] > Sent: 2019年2月25日 23:24 > To: Peng Fan > Cc: t...@kernel.org; c...@linux.com; linux...@kvack.org; > linux-kernel@vger.kernel.org; van.free...@gmail.com > Subject: Re: [

Re: [RFC] percpu: decrease pcpu_nr_slots by 1

2019-02-25 Thread den...@kernel.org
On Sun, Feb 24, 2019 at 09:17:08AM +, Peng Fan wrote: > Entry pcpu_slot[pcpu_nr_slots - 2] is wasted with current code logic. > pcpu_nr_slots is calculated with `__pcpu_size_to_slot(size) + 2`. > Take pcpu_unit_size as 1024 for example, __pcpu_size_to_slot will > return max(11 - PCPU_SLOT_BASE_

[RFC] percpu: decrease pcpu_nr_slots by 1

2019-02-24 Thread Peng Fan
Entry pcpu_slot[pcpu_nr_slots - 2] is wasted with current code logic. pcpu_nr_slots is calculated with `__pcpu_size_to_slot(size) + 2`. Take pcpu_unit_size as 1024 for example, __pcpu_size_to_slot will return max(11 - PCPU_SLOT_BASE_SHIFT + 2, 1), it is 8, so the pcpu_nr_slots will be 10. The chun