Skip to content

mm: fix instances of non-modular code using modular fcns

Paul Gortmaker linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10mm: make cleancache.c explicitly non-modularmm/cleancache.c+2 -24 replies
2/10mm: make slab_common.c explicitly non-modularmm/slab_common.c+2 -22 replies
3/10mm: make hugetlb.c explicitly non-modularmm/hugetlb.c+1 -381 reply
4/10mm: make vmscan.c explicitly non-modularmm/vmscan.c+1 -30 replies
5/10mm: make page_alloc.c explicitly non-modularmm/page_alloc.c+1 -10 replies
6/10mm: make vmstat.c explicitly non-modularmm/vmstat.c+3 -40 replies
7/10mm: make workingset.c explicitly non-modularmm/workingset.c+2 -20 replies
8/10mm: make vmalloc.c explicitly non-modularmm/vmalloc.c+2 -20 replies
9/10mm: make frontswap.c explicitly non-modularmm/frontswap.c+2 -31 reply
10/10mm: make kasan.c explicitly non-modularmm/kasan/kasan.c+1 -30 replies

Reviews trailers per patch

2 of 10 patches have a Reviewed-by or Acked-by.

PatchKonrad Rzeszutek Wilk
1/10R-b
2/10
3/10
4/10
5/10
6/10
7/10
8/10
9/10R-b
10/10

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

Read the v1 thread

Cover letter [PATCH 00/10] mm: fix instances of non-modular code using modular fcns

In the previous merge window, we made changes to allow better delineation between modular and non-modular code in commit 0fd972a7d91d6e15393c449492a04d94c0b89351 ("module: relocate module_init from init.h to module.h"). This allows us to now ensure module code looks modular and non-modular code does not accidentally look modular without suffering build breakage from header entanglement.

Here we target mm code that is, by nature of their Kconfig/Makefile, only available to be built-in, but implicitly presenting itself as being possibly modular by way of using modular headers and macros.

The goal here is to remove that illusion of modularity from these files, but in a way that leaves the actual runtime unchanged. We also get the side benefit of a reduced CPP overhead, since the removal of module.h from a file can reduce the number of lines emitted by 20k.

In all but the hugetlb change, the change is the trivial remapping of module_init onto device_initcall -- which is what module_init becomes in the non-modular case. In the hugetlb case, there was also an unused/orphaned module_exit chunk of code that got removed.

I considered using an alternate level (i.e. earlier) initcall but since we don't have an mm initcall category, there wasn't a clear choice. And staying with device initcall reduces this patch series to zero risk by keeping the status quo on init order processing, which is I think preferable as we approach the merge window in a week.

Paul.
---

Cc Andrew Morton <[email protected]>
Cc Andrey Konovalov <[email protected]>
Cc Andrey Ryabinin <[email protected]>
Cc Christoph Lameter <[email protected]>
Cc Davidlohr Bueso <[email protected]>
Cc David Rientjes <[email protected]>
Cc Hillf Danton <[email protected]>
Cc Johannes Weiner <[email protected]>
Cc Joonsoo Kim <[email protected]>
Cc Konrad Rzeszutek Wilk <[email protected]>
Cc Mel Gorman <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Mike Kravetz <[email protected]>
Cc Minchan Kim <[email protected]>
Cc Naoya Horiguchi <[email protected]>
Cc Pekka Enberg <[email protected]>
Cc Rob Jones <[email protected]>
Cc Roman Pen <[email protected]>
Cc Sasha Levin <[email protected]>
Cc Toshi Kani <[email protected]>
Cc Vladimir Davydov <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc WANG Chao <[email protected]>

Paul Gortmaker (10):
mm: make cleancache.c explicitly non-modular
mm: make slab_common.c explicitly non-modular
mm: make hugetlb.c explicitly non-modular
mm: make vmscan.c explicitly non-modular
mm: make page_alloc.c explicitly non-modular
mm: make vmstat.c explicitly non-modular
mm: make workingset.c explicitly non-modular
mm: make vmalloc.c explicitly non-modular
mm: make frontswap.c explicitly non-modular
mm: make kasan.c explicitly non-modular

 mm/cleancache.c  |  4 ++--
 mm/frontswap.c   |  5 ++---
 mm/hugetlb.c     | 39 +--------------------------------------
 mm/kasan/kasan.c |  4 +---
 mm/page_alloc.c  |  2 +-
 mm/slab_common.c |  4 ++--
 mm/vmalloc.c     |  4 ++--
 mm/vmscan.c      |  4 +---
 mm/vmstat.c      |  7 +++----
 mm/workingset.c  |  4 ++--
 10 files changed, 17 insertions(+), 60 deletions(-)
Signature · 7 lines
2.5.0

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>