[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180322095044.GA23100@dhcp22.suse.cz>
Date: Thu, 22 Mar 2018 10:50:44 +0100
From: Michal Hocko <mhocko@...nel.org>
To: Nick Desaulniers <nick.desaulniers@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Johannes Weiner <hannes@...xchg.org>,
mgorman@...hsingularity.net, vbabka@...e.cz,
Minchan Kim <minchan@...nel.org>,
linux-mm <linux-mm@...ck.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
paullawrence@...gle.com
Subject: Re: [PATCH] mm/vmscan: fix unsequenced modification and access
warning
On Wed 21-03-18 14:37:04, Nick Desaulniers wrote:
> Sorry to dig up an old thread but a coworker was asking about this
> patch. This is essentially the code that landed in commit
> f2f43e566a02a3bdde0a65e6a2e88d707c212a29 "mm/vmscan.c: fix unsequenced
> modification and access warning".
>
> Is .reclaim_idx still correct in the case of try_to_free_pages()?
Yes, it gets initialized from the given gfp_mask. sc.gfp_mask might be
sllightly different but that doesn't change the reclaim_idx because we
only drop __GFP_{FS,IO} which do not have any zone modification effects.
> It
> looks like reclaim_idx is based on the original gfp_mask in
> __node_reclaim(), but in try_to_free_pages() it looks like it may have
> been based on current_gfp_context()? (The sequencing is kind of
> ambiguous, thus fixed in my patch)
>
> Was there a bug in the original try_to_free_pages() pre commit
> f2f43e566a0, or is .reclaim_idx supposed to be different between
> try_to_free_pages() and __node_reclaim()?
I do not think there was any real bug.
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists