Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp382416ybd; Tue, 25 Jun 2019 23:25:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqzLW+e7MtuAbOg7mNFlregtGYeO6XOomX18qhww1xk/vHdhgMpRfYc6O+murO6JldV3kUyl X-Received: by 2002:a63:8043:: with SMTP id j64mr1279468pgd.216.1561530341040; Tue, 25 Jun 2019 23:25:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561530341; cv=none; d=google.com; s=arc-20160816; b=bHyrcaJeG2mfQNxb4q/MZ8Em3huTVIfu2JDmChC+AFvx66uXWyFQoTjCE17Fkodz6/ yC+u/CnzAL82RpBHl8M5EQa995A2/J5mZbgwCJji0fEA2QhxOmNmqDDkg4jupNLq2njs HuPkIlXmoS4V5vfp54v6sUGtncSkHJ4fKpxLB2/ynoX5zqXOsivtrvMrlIUrK5WfmkKw ZQno1rmg5pJQTaarxW851kVDNKqwpSVmgCRQPAWvMRd94G+5exbCR3rwHQQ5bLqvBoMC OlMoYDteqNbBajtSm+joZAr+c944VyS7590ZZz2lW18yXi5QCrL11Nv2WBqyVb4w+Eyf vmvg== 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; bh=ixbkhMjrvN4fyamwYxcbOCGRSUAVx754wX2dY3eqNS0=; b=Nf8SEE9qaoB4+1Xu6fn+STW7Fcnp88sknapNzB/rcA/TvBP8dYpy439kUpg+uRKYJy KqdI26fOSkd7sm+TwT5qUb9nDAC66OvIPWIdIp0UwSLZ+c/HWb2dgt/u0mFLZKt8P/w4 zG/XRZqlWryIQR9yR0kAHC9fYe9M1lFhIoKIm2bsChywVFBN4jknFvBtXDI+S/ZLoke4 zcEw4pQZ8KAiS/q/VxIvKrC077OLMOJlOII0RGkotpeAVU17cPIpoIin/mAJbxEABm2P 6m4ZZzpQBONRnMBQFYMM4T2/Eem3WBYH6IvJCuYoKfwmS+M/iiNBiNFdfLonWToPQ+E7 NuCA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f19si16912895pfd.137.2019.06.25.23.25.00; Tue, 25 Jun 2019 23:25:41 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726713AbfFZGYc (ORCPT + 99 others); Wed, 26 Jun 2019 02:24:32 -0400 Received: from mx2.suse.de ([195.135.220.15]:59580 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725379AbfFZGYc (ORCPT ); Wed, 26 Jun 2019 02:24:32 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 011A7AD47; Wed, 26 Jun 2019 06:24:31 +0000 (UTC) Date: Wed, 26 Jun 2019 08:24:28 +0200 From: Michal Hocko To: Alastair D'Silva Cc: alastair@d-silva.org, Greg Kroah-Hartman , "Rafael J. Wysocki" , Andrew Morton , Pavel Tatashin , Oscar Salvador , Mike Rapoport , Baoquan He , Wei Yang , Logan Gunthorpe , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v2 3/3] mm: Don't manually decrement num_poisoned_pages Message-ID: <20190626062428.GH17798@dhcp22.suse.cz> References: <20190626061124.16013-1-alastair@au1.ibm.com> <20190626061124.16013-4-alastair@au1.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190626061124.16013-4-alastair@au1.ibm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 26-06-19 16:11:23, Alastair D'Silva wrote: > From: Alastair D'Silva > > Use the function written to do it instead. I am not sure a single line helper is a great win but this makes the code consistent at least. > Signed-off-by: Alastair D'Silva Acked-by: Michal Hocko > --- > mm/sparse.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/mm/sparse.c b/mm/sparse.c > index 1ec32aef5590..d9b3625bfdf0 100644 > --- a/mm/sparse.c > +++ b/mm/sparse.c > @@ -11,6 +11,8 @@ > #include > #include > #include > +#include > +#include > > #include "internal.h" > #include > @@ -772,7 +774,7 @@ static void clear_hwpoisoned_pages(struct page *memmap, > > for (i = start; i < start + count; i++) { > if (PageHWPoison(&memmap[i])) { > - atomic_long_sub(1, &num_poisoned_pages); > + num_poisoned_pages_dec(); > ClearPageHWPoison(&memmap[i]); > } > } > -- > 2.21.0 -- Michal Hocko SUSE Labs