summaryrefslogtreecommitdiffstats
path: root/mm/mmap.c
diff options
context:
space:
mode:
authorMel Gorman <mgorman@techsingularity.net>2016-05-20 02:14:38 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-20 04:12:14 +0200
commite2769dbdc51f1baa1908ecf6c84d50f19577e1db (patch)
treec46aadcd53eb71d073221cd5249bb41dab25e457 /mm/mmap.c
parentmm, page_alloc: defer debugging checks of pages allocated from the PCP (diff)
downloadlinux-e2769dbdc51f1baa1908ecf6c84d50f19577e1db.tar.xz
linux-e2769dbdc51f1baa1908ecf6c84d50f19577e1db.zip
mm, page_alloc: don't duplicate code in free_pcp_prepare
The new free_pcp_prepare() function shares a lot of code with free_pages_prepare(), which makes this a maintenance risk when some future patch modifies only one of them. We should be able to achieve the same effect (skipping free_pages_check() from !DEBUG_VM configs) by adding a parameter to free_pages_prepare() and making it inline, so the checks (and the order != 0 parts) are eliminated from the call from free_pcp_prepare(). !DEBUG_VM: bloat-o-meter reports no difference, as my gcc was already inlining free_pages_prepare() and the elimination seems to work as expected DEBUG_VM bloat-o-meter: add/remove: 0/1 grow/shrink: 2/0 up/down: 1035/-778 (257) function old new delta __free_pages_ok 297 1060 +763 free_hot_cold_page 480 752 +272 free_pages_prepare 778 - -778 Here inlining didn't occur before, and added some code, but it's ok for a debug option. [akpm@linux-foundation.org: fix build] Signed-off-by: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/mmap.c')
0 files changed, 0 insertions, 0 deletions