Re: [PATCH 4/6] mm: don't remap unused subpages when splitting isolated thp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2024-07-30 at 13:46 +0100, Usama Arif wrote:
> 
> +	/*
> +	 * The pmd entry mapping the old thp was flushed and the pte
> mapping
> +	 * this subpage has been non present. Therefore, this
> subpage is
> +	 * inaccessible. We don't need to remap it if it contains
> only zeros.
> +	 */
> +	addr = kmap_local_page(page);
> +	dirty = memchr_inv(addr, 0, PAGE_SIZE);
> +	kunmap_local(addr);
> +
> +	if (dirty)
> +		return false;
> 

A minor nitpick here. The word dirty has a few different meanings
in memory management already.

Could it be clearer to use something like "contains_data" ?

-- 
All Rights Reversed.





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux