[0/8] Cleanup and optimization patches for percpu

Message ID 20221024081435.204970-1-bhe@redhat.com
Headers
Series Cleanup and optimization patches for percpu |

Message

Baoquan He Oct. 24, 2022, 8:14 a.m. UTC
  These were found out when reading percpu code, and queued in my local
branch for long time. Send them out for reviewing.

Baoquan He (8):
  mm/percpu: remove unused pcpu_map_extend_chunks
  mm/percpu: use list_first_entry_or_null in pcpu_reclaim_populated()
  mm/percpu: Update the code comment when creating new chunk
  mm/percpu: add comment to state the empty populated pages accounting
  mm/percpu: replace the goto with break
  mm/percpu.c: remove the lcm code since block size is fixed at page
    size
  mm/percpu: remove unused PERCPU_DYNAMIC_EARLY_SLOTS
  mm/slub, percpu: correct the calculation of early percpu allocation
    size

 include/linux/percpu.h |  7 +++----
 mm/percpu.c            | 44 +++++++++++++++++-------------------------
 mm/slub.c              |  3 ++-
 3 files changed, 23 insertions(+), 31 deletions(-)
  

Comments

Dennis Zhou Oct. 24, 2022, 5:09 p.m. UTC | #1
Hello,

On Mon, Oct 24, 2022 at 04:14:27PM +0800, Baoquan He wrote:
> These were found out when reading percpu code, and queued in my local
> branch for long time. Send them out for reviewing.
> 
> Baoquan He (8):
>   mm/percpu: remove unused pcpu_map_extend_chunks
>   mm/percpu: use list_first_entry_or_null in pcpu_reclaim_populated()
>   mm/percpu: Update the code comment when creating new chunk
>   mm/percpu: add comment to state the empty populated pages accounting
>   mm/percpu: replace the goto with break
>   mm/percpu.c: remove the lcm code since block size is fixed at page
>     size
>   mm/percpu: remove unused PERCPU_DYNAMIC_EARLY_SLOTS
>   mm/slub, percpu: correct the calculation of early percpu allocation
>     size
> 
>  include/linux/percpu.h |  7 +++----
>  mm/percpu.c            | 44 +++++++++++++++++-------------------------
>  mm/slub.c              |  3 ++-
>  3 files changed, 23 insertions(+), 31 deletions(-)
> 
> -- 
> 2.34.1
> 
> 

Thanks for the clean ups. The empty page accounting is more subtle than
I remember.


Andrew, I think for these cleanups it'd be easiest for you to pick these
up.

Thanks,
Dennis
  
Dennis Zhou Nov. 8, 2022, 7:05 a.m. UTC | #2
Hello Baoquan,

On Mon, Oct 24, 2022 at 04:14:27PM +0800, Baoquan He wrote:
> These were found out when reading percpu code, and queued in my local
> branch for long time. Send them out for reviewing.
> 
> Baoquan He (8):
>   mm/percpu: remove unused pcpu_map_extend_chunks
>   mm/percpu: use list_first_entry_or_null in pcpu_reclaim_populated()
>   mm/percpu: Update the code comment when creating new chunk
>   mm/percpu: add comment to state the empty populated pages accounting
>   mm/percpu: replace the goto with break
>   mm/percpu.c: remove the lcm code since block size is fixed at page
>     size
>   mm/percpu: remove unused PERCPU_DYNAMIC_EARLY_SLOTS
>   mm/slub, percpu: correct the calculation of early percpu allocation
>     size
> 
>  include/linux/percpu.h |  7 +++----
>  mm/percpu.c            | 44 +++++++++++++++++-------------------------
>  mm/slub.c              |  3 ++-
>  3 files changed, 23 insertions(+), 31 deletions(-)
> 
> -- 
> 2.34.1
> 
> 

I've applied patches 1-7 to for-6.2.

Thanks,
Dennis
  
Baoquan He Nov. 8, 2022, 9:14 a.m. UTC | #3
On 11/07/22 at 11:05pm, Dennis Zhou wrote:
> Hello Baoquan,
> 
> On Mon, Oct 24, 2022 at 04:14:27PM +0800, Baoquan He wrote:
> > These were found out when reading percpu code, and queued in my local
> > branch for long time. Send them out for reviewing.
> > 
> > Baoquan He (8):
> >   mm/percpu: remove unused pcpu_map_extend_chunks
> >   mm/percpu: use list_first_entry_or_null in pcpu_reclaim_populated()
> >   mm/percpu: Update the code comment when creating new chunk
> >   mm/percpu: add comment to state the empty populated pages accounting
> >   mm/percpu: replace the goto with break
> >   mm/percpu.c: remove the lcm code since block size is fixed at page
> >     size
> >   mm/percpu: remove unused PERCPU_DYNAMIC_EARLY_SLOTS
> >   mm/slub, percpu: correct the calculation of early percpu allocation
> >     size
> > 
> >  include/linux/percpu.h |  7 +++----
> >  mm/percpu.c            | 44 +++++++++++++++++-------------------------
> >  mm/slub.c              |  3 ++-
> >  3 files changed, 23 insertions(+), 31 deletions(-)
> > 
> > -- 
> > 2.34.1
> > 
> > 
> 
> I've applied patches 1-7 to for-6.2.

Thanks a lot.