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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Andrey Konovalov <adech.fo@xxxxxxxxx>
Cc: Andrey Ryabinin <a.ryabinin@xxxxxxxxxxx>
Cc: Christoph Lameter <cl@xxxxxxxxx>
Cc: Davidlohr Bueso <dave@xxxxxxxxxxxx>
Cc: David Rientjes <rientjes@xxxxxxxxxx>
Cc: Hillf Danton <hillf.zj@xxxxxxxxxxxxxxx>
Cc: Johannes Weiner <hannes@xxxxxxxxxxx>
Cc: Joonsoo Kim <iamjoonsoo.kim@xxxxxxx>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Cc: Mel Gorman <mgorman@xxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxx>
Cc: Mike Kravetz <mike.kravetz@xxxxxxxxxx>
Cc: Minchan Kim <minchan@xxxxxxxxxx>
Cc: Naoya Horiguchi <n-horiguchi@xxxxxxxxxxxxx>
Cc: Pekka Enberg <penberg@xxxxxxxxxx>
Cc: Rob Jones <rob.jones@xxxxxxxxxxxxxxx>
Cc: Roman Pen <r.peniaev@xxxxxxxxx>
Cc: Sasha Levin <sasha.levin@xxxxxxxxxx>
Cc: Toshi Kani <toshi.kani@xxxxxx>
Cc: Vladimir Davydov <vdavydov@xxxxxxxxxxxxx>
Cc: Vlastimil Babka <vbabka@xxxxxxx>
Cc: WANG Chao <chaowang@xxxxxxxxxx>
Cc: linux-mm@xxxxxxxxx


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(-)

-- 
2.5.0

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



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux