Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2094001ybi; Sun, 16 Jun 2019 21:38:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqyxQVtOdEkBlXRW9ImQJMNzO609e0QTbDUY3MgXHVoDtgLrfv7OOGfvLnpmHRMn/xm6QF1h X-Received: by 2002:a17:902:61:: with SMTP id 88mr27532652pla.50.1560746318958; Sun, 16 Jun 2019 21:38:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560746318; cv=none; d=google.com; s=arc-20160816; b=GLo3bxDRxBchZlA7e/26UXnYKX9w018JKoaCFheExQwCc3dY+ONaTdloIJh7go29T5 rQ96z80Uj6g4sGw2dT/QgOkwgif+vwu/W2yXxT6zRFDnxQFfy/XovPkEiHZTDdhyuKXn 1LX1a+deF/dxQ167AnFOr4+Jes463uVt6dc5w1Crh9PrbZxIhfPzP3h2Ztfh8N1iUODD tHYbQgczQU2ZqDdOjFxm0Ys1W/4fQbIX5B9z7N7XM2BJ4S3pqR/5TbiJN0lIy8P6O7jM FU0vieNLvnFDcizU+Os1lcmfdaWElyQz/q5J2KuvrYErAf6l5kp6H+va6QWgxywptOad a1qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :mime-version:references:in-reply-to:date:subject:cc:to:from; bh=JNUaZIXkWp18dhJiS+301s789BGEgEjFsfsmKAuMekU=; b=lM5FSvpr4gH67kUNhy4JHic5ng8Bhl5nBEf8Uy3UJsTtgvo3w5UW9pFxVUAFMq6dlb jubCjQP7M3Z4SOy89Z6v7WHhjZI2UvIfnWJu3sxnjd122f2qwqqYiEQkFGg24bym89ry wWMmaacx1N57CtzdNPb263brS3OhvR6aKCEYCZoNm2YSt2Kqt4z4YuP6z5VrNs9KfFk8 gtjqEVwJCZyAJNVtXP5lKPASd7JD4srp/fD44KN0iHs0eBu1nkLnaGjZTi8YdAAaCXYd YqpZOH6I2q5SuqsdzoFm+DjSD8N3rneGxD5unG8i7QretlQe1TCohwJdm9IdE4+7tVYv aiQA== 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 17si9765993pfw.115.2019.06.16.21.38.24; Sun, 16 Jun 2019 21:38:38 -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 S1726129AbfFQEiR (ORCPT + 99 others); Mon, 17 Jun 2019 00:38:17 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:41918 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725823AbfFQEiP (ORCPT ); Mon, 17 Jun 2019 00:38:15 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5H4buYv169553 for ; Mon, 17 Jun 2019 00:38:14 -0400 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0b-001b2d01.pphosted.com with ESMTP id 2t63fm0wt9-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 17 Jun 2019 00:38:14 -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 05:38:12 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) 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 05:38:06 +0100 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x5H4c5sM59900020 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 17 Jun 2019 04:38:06 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DF9CC4203F; Mon, 17 Jun 2019 04:38:05 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8D7BC42042; Mon, 17 Jun 2019 04:38:05 +0000 (GMT) Received: from ozlabs.au.ibm.com (unknown [9.192.253.14]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 17 Jun 2019 04:38:05 +0000 (GMT) Received: from adsilva.ozlabs.ibm.com (haven.au.ibm.com [9.192.254.114]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.au.ibm.com (Postfix) with ESMTPSA id 7B66FA0208; Mon, 17 Jun 2019 14:38:04 +1000 (AEST) From: "Alastair D'Silva" To: alastair@d-silva.org Cc: 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: [PATCH 3/5] mm: Don't manually decrement num_poisoned_pages Date: Mon, 17 Jun 2019 14:36:29 +1000 X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190617043635.13201-1-alastair@au1.ibm.com> References: <20190617043635.13201-1-alastair@au1.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 19061704-0028-0000-0000-0000037ADD8F X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19061704-0029-0000-0000-0000243ADFC2 Message-Id: <20190617043635.13201-4-alastair@au1.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-06-17_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=709 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906170042 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alastair D'Silva Use the function written to do it instead. Signed-off-by: Alastair D'Silva --- 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