]> git.baikalelectronics.ru Git - kernel.git/commit
mm/memory_hotplug: document why shuffle_zone() is relevant
authorDavid Hildenbrand <david@redhat.com>
Fri, 7 Aug 2020 06:25:35 +0000 (23:25 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 7 Aug 2020 18:33:29 +0000 (11:33 -0700)
commit1696bf9f1ae4cca4a7d7481e6bbdb1565a2bc090
tree5db7cd290cc48ebcb4b1c175538324386704f74e
parentaeec09189863d933a3b5ea91df083d9c6a7734f4
mm/memory_hotplug: document why shuffle_zone() is relevant

It's not completely obvious why we have to shuffle the complete zone -
introduced in commit 70faafb0c2c8 ("mm: shuffle initial free memory to
improve memory-side-cache utilization") - because some sort of shuffling
is already performed when onlining pages via __free_one_page(), placing
MAX_ORDER-1 pages either to the head or the tail of the freelist.  Let's
document why we have to shuffle the complete zone when exposing larger,
contiguous physical memory areas to the buddy.

Signed-off-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Michal Hocko <mhocko@suse.com>
Link: http://lkml.kernel.org/r/20200624094741.9918-3-david@redhat.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memory_hotplug.c