[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250519062605.2357-1-21cnbao@gmail.com>
Date: Mon, 19 May 2025 18:26:05 +1200
From: Barry Song <21cnbao@...il.com>
To: ryncsn@...il.com
Cc: akpm@...ux-foundation.org,
baohua@...nel.org,
baolin.wang@...ux.alibaba.com,
bhe@...hat.com,
chrisl@...nel.org,
david@...hat.com,
hannes@...xchg.org,
hughd@...gle.com,
kaleshsingh@...gle.com,
kasong@...cent.com,
linux-kernel@...r.kernel.org,
linux-mm@...ck.org,
nphamcs@...il.com,
ryan.roberts@....com,
shikemeng@...weicloud.com,
tim.c.chen@...ux.intel.com,
willy@...radead.org,
ying.huang@...ux.alibaba.com,
yosryahmed@...gle.com
Subject: Re: [PATCH 06/28] mm, swap: rearrange swap cluster definition and helpers
> From: Kairui Song <kasong@...cent.com>
> @@ -889,10 +849,8 @@ static unsigned long cluster_alloc_swap_entry(struct swap_info_struct *si, int o
> /* Serialize HDD SWAP allocation for each device. */
> spin_lock(&si->global_cluster_lock);
> offset = si->global_cluster->next[order];
> - if (offset == SWAP_ENTRY_INVALID)
> - goto new_cluster;
We are implicitly dropping this. Does it mean the current code is wrong?
Do we need some clarification about this?
>
> - ci = lock_cluster(si, offset);
> + ci = swap_lock_cluster(si, offset);
> /* Cluster could have been used by another order */
> if (cluster_is_usable(ci, order)) {
> if (cluster_is_empty(ci))
Thanks
Barry
Powered by blists - more mailing lists