aboutsummaryrefslogtreecommitdiff
path: root/kernel/livepatch/patch.c
diff options
context:
space:
mode:
authorOscar Salvador <[email protected]>2021-04-29 22:57:22 -0700
committerLinus Torvalds <[email protected]>2021-04-30 11:20:38 -0700
commitfaf1c0008a33d4ac6336f63a358641cf86926fc0 (patch)
treece5aeea0c8796ef10d3d98a03e6058cb02ec9bad /kernel/livepatch/patch.c
parent8d400913c231bd1da74067255816453f96cd35b0 (diff)
x86/vmemmap: optimize for consecutive sections in partial populated PMDs
We can optimize in the case we are adding consecutive sections, so no memset(PAGE_UNUSED) is needed. In that case, let us keep track where the unused range of the previous memory range begins, so we can compare it with start of the range to be added. If they are equal, we know sections are added consecutively. For that purpose, let us introduce 'unused_pmd_start', which always holds the beginning of the unused memory range. In the case a section does not contiguously follow the previous one, we know we can memset [unused_pmd_start, PMD_BOUNDARY) with PAGE_UNUSE. This patch is based on a similar patch by David Hildenbrand: https://lore.kernel.org/linux-mm/[email protected]/ Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Oscar Salvador <[email protected]> Acked-by: Dave Hansen <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: "H . Peter Anvin" <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Zi Yan <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'kernel/livepatch/patch.c')
0 files changed, 0 insertions, 0 deletions