Re: [PATCH RFC 0/4] mm: percpu: Cleanup percpu first chunk funciton

2021-11-29 Thread Dennis Zhou
Hello, On Sun, Nov 21, 2021 at 05:35:53PM +0800, Kefeng Wang wrote: > When support page mapping percpu first chunk allocator on arm64, we > found there are lots of duplicated codes in percpu embed/page first > chunk allocator. This patchset is aimed to cleanup them and should > no funciton change,

Re: [PATCH RFC 4/4] mm: percpu: Add generic pcpu_populate_pte() function

2021-11-29 Thread Dennis Zhou
On Sun, Nov 21, 2021 at 05:35:57PM +0800, Kefeng Wang wrote: > When NEED_PER_CPU_PAGE_FIRST_CHUNK enabled, we need a function to > populate pte, add a generic pcpu populate pte function and switch > to use it. > > Signed-off-by: Kefeng Wang > --- > arch/powerpc/kernel/setup_64.c | 47 +--

Re: [PATCH RFC 3/4] mm: percpu: Add generic pcpu_fc_alloc/free funciton

2021-11-29 Thread Dennis Zhou
On Sun, Nov 21, 2021 at 05:35:56PM +0800, Kefeng Wang wrote: > With previous patch, we could add a generic pcpu first chunk > allocation and free function to cleanup the duplicated definations > on each architecture. > > Signed-off-by: Kefeng Wang > --- > arch/mips/mm/init.c| 16 +---

Re: [PATCH RFC 2/4] mm: percpu: Add pcpu_fc_cpu_to_node_fn_t typedef

2021-11-29 Thread Dennis Zhou
On Sun, Nov 21, 2021 at 05:35:55PM +0800, Kefeng Wang wrote: > Add pcpu_fc_cpu_to_node_fn_t and pass it into pcpu_fc_alloc_fn_t, > pcpu first chunk allocation will call it to alloc memblock on the > corresponding node by it. > > Signed-off-by: Kefeng Wang > --- > arch/mips/mm/init.c|

Re: [PATCH RFC 1/4] mm: percpu: Generalize percpu related config

2021-11-29 Thread Dennis Zhou
Hello, On Sun, Nov 21, 2021 at 05:35:54PM +0800, Kefeng Wang wrote: > The HAVE_SETUP_PER_CPU_AREA/NEED_PER_CPU_EMBED_FIRST_CHUNK/ > NEED_PER_CPU_PAGE_FIRST_CHUNK/USE_PERCPU_NUMA_NODE_ID configs, > which has duplicate definitions on platforms that subscribe it. > > Move them into mm, drop these re

Re: [PATCH RFC 0/4] mm: percpu: Cleanup percpu first chunk funciton

2021-11-28 Thread Dennis Zhou
On Mon, Nov 29, 2021 at 10:51:18AM +0800, Kefeng Wang wrote: > Hi Dennis and all maintainers, any comments about the changes, many thanks. > > On 2021/11/21 17:35, Kefeng Wang wrote: > > When support page mapping percpu first chunk allocator on arm64, we > > found there are lots of duplicated code

Re: [PATCH 7/9] lib/cpumask: add num_{possible,present,active}_cpus_{eq,gt,le}

2021-11-28 Thread Dennis Zhou
Hello, On Sun, Nov 28, 2021 at 09:43:20AM -0800, Yury Norov wrote: > On Sun, Nov 28, 2021 at 09:07:52AM -0800, Joe Perches wrote: > > On Sat, 2021-11-27 at 19:57 -0800, Yury Norov wrote: > > > Add num_{possible,present,active}_cpus_{eq,gt,le} and replace num_*_cpus() > > > with one of new function