On Sun, Jun 28, 2020 at 02:17:22AM +0900, skseofh wrote: > Hi, all > > Please check the patch below. > Thanks:) > > > No need to check validity for every pfn in [spfn, epfn). > --- > mm/page_alloc.c | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) OK, so first, this is more code and added complexity. You haven't justified the extra code or complexity by giving us performance numbers. > { > - unsigned long pfn; > + unsigned long pfn, block_pfn; > u64 pgcnt = 0; > + bool in_block = 0; If something's a bool, then use 'true' and 'false', not 1 and 0.