Re: [PATCH v6 1/4] mm: swap: introduce swap tier infrastructure

From: Baoquan He

Date: Mon May 25 2026 - 18:57:32 EST


On 04/21/26 at 02:53pm, Youngjun Park wrote:
...snip...
> +bool swap_tiers_validate(void)
> +{
> + struct swap_tier *tier;
> +
> + /*
> + * Initial setting might not cover DEF_SWAP_PRIO.
> + * Swap tier must cover the full range (DEF_SWAP_PRIO to SHRT_MAX).
> + */

If so, do we need check if the upmost boundary SHRT_MAX is covered?

> + if (swap_tier_is_active()) {
> + tier = list_last_entry(&swap_tier_active_list,
> + struct swap_tier, list);
> +
> + if (tier->prio != DEF_SWAP_PRIO)
> + return false;
> + }
> +
> + return true;
> +}
...snip...