Skip to content

Remove 'order' argument from many mm functions

Matthew Wilcox linux-mm 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest15 patches 5 repliesIn review
  2. v1 RFC11 patches 12 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15mm: Remove gfp_flags argument from rmqueue_pcplistmm/page_alloc.c+4 -40 replies
2/15mm: Pass order to __alloc_pages_nodemask in GFP flagsinclude/linux/gfp.h include/linux/migrate.h mm/hugetlb.c +2 more+24 -100 replies
3/15mm: Pass order to __alloc_pages in GFP flagsinclude/linux/gfp.h mm/mempolicy.c+4 -60 replies
4/15mm: Pass order to alloc_page_interleave in GFP flagsmm/mempolicy.c+5 -50 replies
5/15mm: Pass order to alloc_pages_current in GFP flagsinclude/linux/gfp.h mm/mempolicy.c+6 -80 replies
6/15mm: Pass order to alloc_pages_vma in GFP flagsinclude/linux/gfp.h mm/mempolicy.c mm/shmem.c+20 -200 replies
7/15mm: Pass order to __alloc_pages_node in GFP flagsarch/ia64/kernel/uncached.c arch/ia64/sn/pci/pci_dma.c arch/powerpc/platforms/cell/ras.c +13 more+34 -370 replies
8/15mm: Pass order to __get_free_page in GFP flagsinclude/linux/gfp.h mm/page_alloc.c+6 -60 replies
9/15mm: Pass order to prep_new_page in GFP flagsmm/page_alloc.c+5 -40 replies
10/15mm: Pass order to rmqueue in GFP flagsmm/page_alloc.c+4 -50 replies
11/15mm: Pass order to get_page_from_freelist in GFP flagsmm/page_alloc.c+11 -120 replies
12/15mm: Pass order to __alloc_pages_cpuset_fallback in GFP flagsmm/page_alloc.c+3 -40 replies
13/15mm: Pass order to prepare_alloc_pages in GFP flagsmm/page_alloc.c+8 -70 replies
14/15mm: Pass order to try_to_free_pages in GFP flagsinclude/linux/swap.h include/trace/events/vmscan.h mm/page_alloc.c +1 more+22 -281 reply
15/15mm: Pass order to node_reclaim() in GFP flagsinclude/trace/events/vmscan.h mm/internal.h mm/page_alloc.c +1 more+12 -160 replies

Reviews trailers per patch

None of the 15 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchIra Weiny
SeriesR-b
1/15
2/15
3/15
4/15
5/15
6/15
7/15
8/15
9/15
10/15
11/15
12/15
13/15
14/15
15/15

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 00/15] Remove 'order' argument from many mm functions

From: "Matthew Wilcox (Oracle)" <[email protected]>

This is a little more serious attempt than v1, since nobody seems opposed to the concept of using GFP flags to pass the order around. I've split it up a bit better, and I've reversed the arguments of __alloc_pages_node to match the order of the arguments to other functions in the same family. alloc_pages_node() needs the same treatment, but there's about 70 callers, so I'm going to skip it for now.

This is against current -mm. I'm seeing a text saving of 482 bytes from a tinyconfig vmlinux (1003785 reduced to 1003303). There are more savings to be had by combining together order and the gfp flags, for example in the scan_control data structure.

I think there are also cognitive savings to be had from eliminating some of the function variants which exist solely to take an 'order'.

Matthew Wilcox (Oracle) (15):
mm: Remove gfp_flags argument from rmqueue_pcplist
mm: Pass order to __alloc_pages_nodemask in GFP flags
mm: Pass order to __alloc_pages in GFP flags
mm: Pass order to alloc_page_interleave in GFP flags
mm: Pass order to alloc_pages_current in GFP flags
mm: Pass order to alloc_pages_vma in GFP flags
mm: Pass order to __alloc_pages_node in GFP flags
mm: Pass order to __get_free_page in GFP flags
mm: Pass order to prep_new_page in GFP flags
mm: Pass order to rmqueue in GFP flags
mm: Pass order to get_page_from_freelist in GFP flags
mm: Pass order to __alloc_pages_cpuset_fallback in GFP flags
mm: Pass order to prepare_alloc_pages in GFP flags
mm: Pass order to try_to_free_pages in GFP flags
mm: Pass order to node_reclaim() in GFP flags

 arch/ia64/kernel/uncached.c       |  6 +-
 arch/ia64/sn/pci/pci_dma.c        |  4 +-
 arch/powerpc/platforms/cell/ras.c |  5 +-
 arch/x86/events/intel/ds.c        |  4 +-
 arch/x86/kvm/vmx/vmx.c            |  4 +-
 drivers/misc/sgi-xp/xpc_uv.c      |  5 +-
 include/linux/gfp.h               | 59 +++++++++++--------
 include/linux/migrate.h           |  2 +-
 include/linux/swap.h              |  2 +-
 include/trace/events/vmscan.h     | 28 ++++-----
 kernel/profile.c                  |  2 +-
 mm/filemap.c                      |  2 +-
 mm/gup.c                          |  4 +-
 mm/hugetlb.c                      |  5 +-
 mm/internal.h                     |  5 +-
 mm/khugepaged.c                   |  2 +-
 mm/mempolicy.c                    | 34 +++++------
 mm/migrate.c                      |  9 ++-
 mm/page_alloc.c                   | 98 +++++++++++++++----------------
 mm/shmem.c                        |  5 +-
 mm/slab.c                         |  3 +-
 mm/slob.c                         |  2 +-
 mm/slub.c                         |  2 +-
 mm/vmscan.c                       | 26 ++++----
 24 files changed, 157 insertions(+), 161 deletions(-)
Signature · 1 line
2.20.1