aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mm/vmscan.c
diff options
context:
space:
mode:
authorWei Yang <richard.weiyang@gmail.com>2024-06-12 02:04:21 +0000
committerAndrew Morton <akpm@linux-foundation.org>2024-07-03 19:30:12 -0700
commit972b89c1f05f49bac53ea977d20b49330b81b0fa (patch)
tree9e8d3825fb093df0fc6f01ed29c254814a4d85cb /mm/vmscan.c
parentmm/memory-failure: correct comment in me_swapcache_dirty (diff)
downloadwireguard-linux-972b89c1f05f49bac53ea977d20b49330b81b0fa.tar.xz
wireguard-linux-972b89c1f05f49bac53ea977d20b49330b81b0fa.zip
mm/mm_init.c: simplify logic of deferred_[init|free]_pages
Function deferred_[init|free]_pages are only used in deferred_init_maxorder(), which makes sure the range to init/free is within MAX_ORDER_NR_PAGES size. With this knowledge, we can simplify these two functions. Since * only the first pfn could be IS_MAX_ORDER_ALIGNED() Also since the range passed to deferred_[init|free]_pages is always from memblock.memory for those we have already allocated memmap to cover, pfn_valid() always return true. Then we can remove related check. [richard.weiyang@gmail.com: adjust function declaration indention per David] Link: https://lkml.kernel.org/r/20240613114525.27528-1-richard.weiyang@gmail.com Link: https://lkml.kernel.org/r/20240612020421.31975-1-richard.weiyang@gmail.com Signed-off-by: Wei Yang <richard.weiyang@gmail.com> Reviewed-by: Mike Rapoport (IBM) <rppt@kernel.org> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: David Hildenbrand <david@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/vmscan.c')
0 files changed, 0 insertions, 0 deletions