lkml.org 
[lkml]   [2021]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.

\
 
 \ /
  Last update: 2021-11-16 09:34    [W:0.381 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site