Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932370AbbHXWQp (ORCPT ); Mon, 24 Aug 2015 18:16:45 -0400 Received: from mail1.windriver.com ([147.11.146.13]:47779 "EHLO mail1.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932295AbbHXWQm (ORCPT ); Mon, 24 Aug 2015 18:16:42 -0400 From: Paul Gortmaker To: Andrew Morton CC: , , Paul Gortmaker , Andrey Konovalov , Andrey Ryabinin , Christoph Lameter , Davidlohr Bueso , David Rientjes , Hillf Danton , Johannes Weiner , Joonsoo Kim , Konrad Rzeszutek Wilk , Mel Gorman , Michal Hocko , Mike Kravetz , Minchan Kim , Naoya Horiguchi , Pekka Enberg , Rob Jones , Roman Pen , Sasha Levin , Toshi Kani , Vladimir Davydov , Vlastimil Babka , WANG Chao Subject: [PATCH 00/10] mm: fix instances of non-modular code using modular fcns Date: Mon, 24 Aug 2015 18:14:32 -0400 Message-ID: <1440454482-12250-1-git-send-email-paul.gortmaker@windriver.com> X-Mailer: git-send-email 2.5.0 MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3548 Lines: 89 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 Cc: Andrey Konovalov Cc: Andrey Ryabinin Cc: Christoph Lameter Cc: Davidlohr Bueso Cc: David Rientjes Cc: Hillf Danton Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Konrad Rzeszutek Wilk Cc: Mel Gorman Cc: Michal Hocko Cc: Mike Kravetz Cc: Minchan Kim Cc: Naoya Horiguchi Cc: Pekka Enberg Cc: Rob Jones Cc: Roman Pen Cc: Sasha Levin Cc: Toshi Kani Cc: Vladimir Davydov Cc: Vlastimil Babka Cc: WANG Chao Cc: linux-mm@kvack.org 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 from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/