lkml.org 
[lkml]   [2019]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/6] x86, mm: refine split_mem_range a little
Date
split_mem_range is used to prepare range before mapping kernel page table.
Here are some patches to refine it.

Patch [1-2] are trivial clean up.
Patch [3] add some comment to illustrate the split process and prepare for
following refine work.
Patch [4-6] are the interesting refine.

There are totally 3 kinds of ranges, while 1G range is only valid on x86_64.
Because of this, the code needs to handle two different configurations. The
conditional macro makes it a little difficult to understand the logic.

We could simplify the logic with a different perception of those ranges, this
is done in Patch [4]. The change is a little, while the result is neat and
clean.

After this, the refreshed code shows we could skip some redundant work when
the range doesn't span PMD or PUD. This is in Patch [4-5].

Wei Yang (6):
x86, mm: remove second argument of split_mem_range()
x86, mm: remove check in save_mr
x86, mm: add comment for split_mem_range to help understanding
x86, mm: make split_mem_range() more easy to read
x86, mm: skip 1G range if the range doesn't span PUD
x86, mm: x86, mm: jump to split only 4K range when range doesn't span
PMD

arch/x86/mm/init.c | 87 ++++++++++++++++++++++++++++++++--------------
1 file changed, 61 insertions(+), 26 deletions(-)

--
2.19.1

\
 
 \ /
  Last update: 2019-02-12 03:12    [W:0.037 / U:1.736 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site