Re: [RFC PATCH v4 10/18] mm/swap: add priority queue for swap device allocation
From: Lian Wang
Date: Mon Nov 16 2026 - 06:28:25 EST
Hi Kairui,
On Mon, 16 Nov 2026 11:51:22 +0800 Kairui Song <ryncsn@xxxxxxxxx> wrote:
> Hmm, this patch is now quite different from what I posted in the link
> above, e.g. there wasn't a "struct swap_queue_cursor", and some of the
> naming in it is quite confusing:
> e.g. "ring_only", I think what you actually want is "fallback_allowed"
> or "no_fallback".
>
> And since there are three iterator-like structs, we better reorganize
> the naming; 'iterator' vs 'cursor' is confusing. e.g. maybe reame
> swap_ring_iterator to swap_queue_reader_head.
>
> And why do we need a "cursor->valid"? I see a following commit dropped
> that, so perhaps accetable to keep it as intermediate step though.
Thanks for the review. You're right, this patch has changed quite a bit
from the original. I'll give the naming more thought.
I haven't explained the reasoning behind all the changes clearly enough,
especially with the adjustments following Sashiko's feedback on v3.
I'll go back over the changes and make the naming and intent clearer.
Thanks again for taking the time to go through this.
Best regards,
Lian Wang