Received: by 10.213.65.68 with SMTP id h4csp529272imn; Thu, 22 Mar 2018 02:52:28 -0700 (PDT) X-Google-Smtp-Source: AG47ELua4qTrvyZuO0HfDUsXyNewDPyU5DBfZwJKHd+TsH/le5i02+H7V+Jp9xHFTnN/QYk2LDEH X-Received: by 10.167.129.152 with SMTP id g24mr1184502pfi.117.1521712348671; Thu, 22 Mar 2018 02:52:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521712348; cv=none; d=google.com; s=arc-20160816; b=y9YZSQbylorNQlv5ZKXcbEZQMrLvGgicS65UqkVwfsbqGfKXzo/PrxcInYreGJN3h8 lIYdDqkdkVgvwyw64R6lJABElw6kAh784JEZ+WJZbZlAI6MQy48tgosOGTgLC3aaWEjg 2odkbNHhhgG5sd9VdUJffR+26ZxNUWfuxhtWGxPdAAe7+LAIlOEZz+ZdYa66fSbCLto/ ln10x7hgDwlbOa2ui+gtIL5q33M2/2/EoJY2IOBWK1J6QVrF3433J7kPwSScPZzPsaAc dboZ7O0Bh3oyukEPqvUCFWJLlV73EmiGQgY7B27KRN6jWNY+FKQGrutGtx+z7StLuOUt KIKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=dpbMsYmjl4UxqgWggYQu7egaiCK3vgkf26pl+k/mQXE=; b=BI92I3Yb5AhoKShMmn7E3AnqizbDGTNv2qlH6Xz5TH7WHDfuD3M5I1aExdA2Dh/dMa RXP1LGAnORwLPyiX7vaPBbi+6GlwEPlTCbTCudUBKJTmU0J/Fs+TRxj7GNx2QBuH5p+n EmpZtOV5Ya4mRx6iSOnvJvT1WVCyKdANPeyowfPAJCmusxrJPgXqoNbghU2vbYOdDCsU EFEoL6vDNu9/aPIOJeA5sxpEw75Wxwf2VW9g9YEbkK2yOEI9Qpm7WI4BwQ4xH+SRwBBA 5eFQpo2jaFuV2tieLGRnxwsbkPz31b19+FaXOELjAoCf7ioKbV6cnB5QjvMYFGa1Qi3R gCjw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e74si4639330pfd.97.2018.03.22.02.52.13; Thu, 22 Mar 2018 02:52:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752884AbeCVJut (ORCPT + 99 others); Thu, 22 Mar 2018 05:50:49 -0400 Received: from mx2.suse.de ([195.135.220.15]:46523 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752463AbeCVJur (ORCPT ); Thu, 22 Mar 2018 05:50:47 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 1A51FACDD; Thu, 22 Mar 2018 09:50:46 +0000 (UTC) Date: Thu, 22 Mar 2018 10:50:44 +0100 From: Michal Hocko To: Nick Desaulniers Cc: Andrew Morton , Johannes Weiner , mgorman@techsingularity.net, vbabka@suse.cz, Minchan Kim , linux-mm , Linux Kernel Mailing List , paullawrence@google.com Subject: Re: [PATCH] mm/vmscan: fix unsequenced modification and access warning Message-ID: <20180322095044.GA23100@dhcp22.suse.cz> References: <20170510065328.9215-1-nick.desaulniers@gmail.com> <20170510071511.GA31466@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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