Re: [PATCH] mm: memory-failure: remove unneeded page state check in shake_page()

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

 



On Sun, Jun 25, 2023 at 07:34:30PM +0800, Miaohe Lin wrote:
> Remove unneeded PageLRU(p) and is_free_buddy_page(p) check as slab caches
> are not shrunk now. This check can be added back when a lightweight range
> based shrinker is available.

I think your logic is faulty.  Based on the reasoning above, this patch
should be:

> -	if (!PageSlab(p)) {
> -		lru_add_drain_all();
> -		if (PageLRU(p) || is_free_buddy_page(p))
> -			return;
> -	}
> +	if (PageSlab(p))
> +		return;
> +
> +	lru_add_drain_all();
+	if (PageLRU(p) || is_free_buddy_page(p))
+		return;

but maybe it's the description that is wrong.




[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