Re: [PATCH -next v2 18/19] mm: use folio_xchg_last_cpupid() in wp_page_reuse()

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

 



On Fri, Oct 13, 2023 at 04:56:02PM +0800, Kefeng Wang wrote:
> Convert to use folio_xchg_last_cpupid() in wp_page_reuse(), and remove
> page variable.

... another case where we're changing behaviour and need to argue it's
desirable.

> -	/*
> -	 * Clear the pages cpupid information as the existing
> -	 * information potentially belongs to a now completely
> -	 * unrelated process.
> -	 */
> -	if (page)
> -		page_cpupid_xchg_last(page, (1 << LAST_CPUPID_SHIFT) - 1);
> +	if (folio) {
> +		VM_BUG_ON(folio_test_anon(folio) &&
> +			  !PageAnonExclusive(vmf->page));
> +		/*
> +		 * Clear the pages cpupid information as the existing

s/pages/folio's/

> +		 * information potentially belongs to a now completely
> +		 * unrelated process.
> +		 */
> +		folio_xchg_last_cpupid(folio, (1 << LAST_CPUPID_SHIFT) - 1);
> +	}




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux