[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YZNss/ujX3yovr/k@infradead.org>
Date: Tue, 16 Nov 2021 00:32:51 -0800
From: Christoph Hellwig <hch@...radead.org>
To: NeilBrown <neilb@...e.de>
Cc: Trond Myklebust <trond.myklebust@...merspace.com>,
Anna Schumaker <anna.schumaker@...app.com>,
Chuck Lever <chuck.lever@...cle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Mel Gorman <mgorman@...e.de>, linux-nfs@...r.kernel.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 03/13] MM: reclaim mustn't enter FS for swap-over-NFS
On Tue, Nov 16, 2021 at 01:44:04PM +1100, NeilBrown wrote:
> + /* ->flags can be updated non-atomicially (scan_swap_map_slots),
> + * but that will never affect SWP_FS_OPS, so the data_race
> + * is safe.
> + */
> may_enter_fs = (sc->gfp_mask & __GFP_FS) ||
> + (PageSwapCache(page) &&
> + !data_race(page_swap_info(page)->flags & SWP_FS_OPS) &&
> + (sc->gfp_mask & __GFP_IO));
You might want to move the comment and SWP_FS_OPS into a little
inline helper. That makes it a lot more readable and also avoids the
overly long line in the second hunk.
Powered by blists - more mailing lists