Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2184448ybi; Sun, 16 Jun 2019 23:54:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqzWj0KjjLmSIPSsrOTDo1dZJxvewQxvf6u+BC4tJBIifZf6r5x5kShma3OoIPH0fuJha3W3 X-Received: by 2002:a62:2a0a:: with SMTP id q10mr21382345pfq.237.1560754446971; Sun, 16 Jun 2019 23:54:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560754446; cv=none; d=google.com; s=arc-20160816; b=ygLtQ6mRR+U4jXK3E/NvSDjrbwY4Ksvjt3NkbSfyxi3nAlTHsrKAxAwmBchQKux8Gj EMzZFEbzWgsLvf67UhFiUstr21V4H2N6JoMI7Aqq6WhWEL2c33pKd1m6unPHM5dqRV7g UEs+0OyLAmX9sLwmKwFtbQ+7nSUsbzv55gWfvYCjJmpgAM6LG2untdcJBweN+QXVBZzt IX11GYM2cbV8BIH8xFIhXFQzwHOkKNpxVqniMoWj6Q1HNT3i1hWwDAQRbkmziqPEw95X EJemESo6KGiyaBF/1hZYMm9BjDCEiwKd7sO1NbelmDSXfJeUOjqZaZEiizL7F5JA1nLX yRWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:subject:cc:to:from:date; bh=t+oEk6kgcIIjVu49KhrQu7ca9DlCqLRLN03XXZ7Dy1I=; b=ew07dajgKYKF/FyGOPIRGcqeuiJVMYrzRc9Xn9NriKySR3UhWaHik79JIMAa/EIuKI F/8C9VZeo7O88XjOZSU288kFUXxfsF8qDzc8xpK8MpG/b75AVozJK/cf5UFw/yiaUmnX ANO7/SqCUb1hQI13i7oE9HY+r+1+JFgRKBROXFaIgfa4j7QFYD3sP95NcKeqgeT0xpZI LrkMyqagULg2Qq6jOTJi3ovv7NpaGliIUryTojnXscP/tX6auZdNQ5e79U82lsFfrfpb zYw9VdsMJLgab+x4jMhMvNNuZDP7Oz/lamlH4KmS5Yx1+2eVFeaA1A70EJJKOAoKi/9z w4Zg== 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n15si9177521plp.354.2019.06.16.23.53.51; Sun, 16 Jun 2019 23:54:06 -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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725906AbfFQGxk (ORCPT + 99 others); Mon, 17 Jun 2019 02:53:40 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:49638 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725778AbfFQGxk (ORCPT ); Mon, 17 Jun 2019 02:53:40 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5H6ra4l064556 for ; Mon, 17 Jun 2019 02:53:38 -0400 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0a-001b2d01.pphosted.com with ESMTP id 2t63bhd55j-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 17 Jun 2019 02:53:38 -0400 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 17 Jun 2019 07:52:43 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp07.uk.ibm.com (192.168.101.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 17 Jun 2019 07:52:36 +0100 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x5H6qZ7b49610972 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 17 Jun 2019 06:52:35 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 40BD8A4065; Mon, 17 Jun 2019 06:52:35 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 91E37A4064; Mon, 17 Jun 2019 06:52:33 +0000 (GMT) Received: from rapoport-lnx (unknown [9.148.8.53]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Mon, 17 Jun 2019 06:52:33 +0000 (GMT) Date: Mon, 17 Jun 2019 09:52:31 +0300 From: Mike Rapoport To: "Alastair D'Silva" Cc: alastair@d-silva.org, Andrew Morton , David Hildenbrand , Oscar Salvador , Michal Hocko , Pavel Tatashin , Wei Yang , Arun KS , Qian Cai , Thomas Gleixner , Ingo Molnar , Josh Poimboeuf , Konrad Rzeszutek Wilk , Peter Zijlstra , Jiri Kosina , Mukesh Ojha , Mike Rapoport , Baoquan He , Logan Gunthorpe , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/5] mm: Don't manually decrement num_poisoned_pages References: <20190617043635.13201-1-alastair@au1.ibm.com> <20190617043635.13201-4-alastair@au1.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190617043635.13201-4-alastair@au1.ibm.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-TM-AS-GCONF: 00 x-cbid: 19061706-0028-0000-0000-0000037AE672 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19061706-0029-0000-0000-0000243AE904 Message-Id: <20190617065231.GC16810@rapoport-lnx> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-06-17_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906170064 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 17, 2019 at 02:36:29PM +1000, Alastair D'Silva wrote: > From: Alastair D'Silva > > Use the function written to do it instead. > > Signed-off-by: Alastair D'Silva Reviewed-by: Mike Rapoport > --- > mm/sparse.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/mm/sparse.c b/mm/sparse.c > index 66a99da9b11b..e2402937efe4 100644 > --- a/mm/sparse.c > +++ b/mm/sparse.c > @@ -11,6 +11,8 @@ > #include > #include > #include > +#include > +#include > > #include "internal.h" > #include > @@ -771,7 +773,7 @@ static void clear_hwpoisoned_pages(struct page *memmap, > > for (i = map_offset; i < nr_pages; i++) { > if (PageHWPoison(&memmap[i])) { > - atomic_long_sub(1, &num_poisoned_pages); > + num_poisoned_pages_dec(); > ClearPageHWPoison(&memmap[i]); > } > } > -- > 2.21.0 > -- Sincerely yours, Mike.