Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp100285ybn; Thu, 3 Oct 2019 02:09:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqwZdDCgqkcxBq8M6S3fIhMTa1/4iQA9k6R9Vc7oyR8OJtbOHPktLBTi1qF2hHdRUVfyboyw X-Received: by 2002:a17:906:5c16:: with SMTP id e22mr6735025ejq.105.1570093769286; Thu, 03 Oct 2019 02:09:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570093769; cv=none; d=google.com; s=arc-20160816; b=GbrElMmJqbx6DIzNuD3m6Xkg2A6RXyxXfJSjQazIj1brC0QXO+wsob7c3lULvhozhG Yja/m5bghtjdN2bEywu6I9hEWcp3k8A7u9je+9MaWnsaRUIg+gx4GXzMJj1a87gppe1q Xs7r13Luzp/bM+G73T1u4S+28wJHDG3z/ZahgzSzGRr4uvCcmYb46FRi/v1gwzdhUmNz YDVF9J3diCMoFoeNHAYWJtRwAXcXUL72QJQV5QANXgKjcMfKUuK9XdU1FlPqIYg/RZSK zHDvvxe3YLs32SoQcQsHzoRESGDkqxG6E+036MFTUNxzNHFe4p2ocSrmTKbbVSe7A+N+ QXww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:in-reply-to:cc:references:message-id :date:subject:mime-version:from:content-transfer-encoding :dkim-signature; bh=xWvjAJ+vmNMIpeEImL3eN8FbY3mh5BNsK1umkA/yuKA=; b=RUe0ZdVFBgofx+6VwhGE2Z4qeCI6mo4CtKx6PEFiyVaa9k8gPlAfwq2xEYNBFfVAJo CByZSzazrIA//XyF6BsU06TufvGsJUUY4aEvFsosW4uTwdLv5zDtI2Re+V07jYydxhKx vbT+VOxLv2yYxPn56V6jTCNQrTyZ0yvALTeXw4KBVySMpnr0Rx76YJCX0LfHpUUv6hoI KFMOlMW0xihrbUm6vGKG1o7kxMJztqQYU4Uk3j9LeLmbRNn8Xx7UPPpaPhvJgIYJk4kX bC5FnHvwUClawxrhAc0/88w1nh4rjivAXtSFOmjKwpwQ0oipz1cDgVB64tcWGPXI/e8w cm4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b="rQGq/Gkg"; 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 bq16si916125ejb.221.2019.10.03.02.09.04; Thu, 03 Oct 2019 02:09:29 -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; dkim=pass header.i=@lca.pw header.s=google header.b="rQGq/Gkg"; 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 S1728898AbfJCJFw (ORCPT + 99 others); Thu, 3 Oct 2019 05:05:52 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:42916 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727357AbfJCJFw (ORCPT ); Thu, 3 Oct 2019 05:05:52 -0400 Received: by mail-qt1-f193.google.com with SMTP id w14so2518889qto.9 for ; Thu, 03 Oct 2019 02:05:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=xWvjAJ+vmNMIpeEImL3eN8FbY3mh5BNsK1umkA/yuKA=; b=rQGq/GkgmPP0jTIUHjSC8C6/MU5ReIqGZzuX/UwCB/QPQrP0NRhll8Im3UdtgnegtL nQCUgQGybFYiMBt339er7ABesjSSw3Aehfcp3Xbud3/76ur/paF9kV3/z3aMv/M7WMhO yb+Uq+HZg8zXNIZJbBPO9ZmOrRFUv/9WtbWa6rf8GS2ubKrfn3lEM6Kp+6kiss9xexPw pK33gME4N3znz2EKdbkfEKDndziRVplRPIfDcJPi0fbGdzCnLLqKooB7jaiF5DC0MSRT bfrW29fGQtLDBCIaewDCpiPWg+FM82o80P2EdaeWdf0KsBKGFpxaFqJKmyeuN1e656F0 QAgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=xWvjAJ+vmNMIpeEImL3eN8FbY3mh5BNsK1umkA/yuKA=; b=jTidxPcYpjbP9qKHDIfa7mAVJ1po/mj9LQa0dWt3JNOYTQ/qHrio8BVdiryerQ541K 8eqbk3RlBqrgF7bPPzoFprjqwGAjrzzqbShrsljyS9g1Bq7P7JlPhuS3ZHIV12dBhLBL nrEugVn6w6AUU7wz8AT5cuDTrwcst9twjsOJYN3FJX9VxhQw5JWp4HJTq6DIni4TNO05 8Jd7gqwBzLv+yIY0KaKPN49/eqLwSQVHjcPMweD60AKnocSzNJuUdGRBnd/uui5Wd8dY 3AECcY3erruqGs6VJjj07bBov7iZb7kDncLidgHQkJJ9AxcUmHyFHCaENqaOz/WqeN0F doGg== X-Gm-Message-State: APjAAAVqCsP1xK85p8mvmwRm/Wp5OVYFkWjcDusIkBCGYB2jl08+LWdF 30YT9DrSGGHbD2nvgKb/eCHDBg== X-Received: by 2002:ac8:4304:: with SMTP id z4mr8649614qtm.160.1570093551315; Thu, 03 Oct 2019 02:05:51 -0700 (PDT) Received: from [192.168.1.183] (pool-71-184-117-43.bstnma.fios.verizon.net. [71.184.117.43]) by smtp.gmail.com with ESMTPSA id c20sm829041qkm.11.2019.10.03.02.05.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Oct 2019 02:05:50 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Qian Cai Mime-Version: 1.0 (1.0) Subject: Re: [PATCH] mm/page_alloc: Add a reason for reserved pages in has_unmovable_pages() Date: Thu, 3 Oct 2019 05:05:50 -0400 Message-Id: <7FA7CBE1-E0A9-40E2-B3CA-0896F6D491E5@lca.pw> References: <1570090257-25001-1-git-send-email-anshuman.khandual@arm.com> Cc: linux-mm@kvack.org, Andrew Morton , Michal Hocko , Vlastimil Babka , Oscar Salvador , Mel Gorman , Mike Rapoport , Dan Williams , Pavel Tatashin , linux-kernel@vger.kernel.org In-Reply-To: <1570090257-25001-1-git-send-email-anshuman.khandual@arm.com> To: Anshuman Khandual X-Mailer: iPhone Mail (17A844) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Oct 3, 2019, at 4:10 AM, Anshuman Khandual w= rote: >=20 > Having unmovable pages on a given pageblock should be reported correctly > when required with REPORT_FAILURE flag. But there can be a scenario where a= > reserved page in the page block will get reported as a generic "unmovable"= > reason code. Instead this should be changed to a more appropriate reason > code like "Reserved page". Isn=E2=80=99t this redundant as it dumps the flags in dump_page() anyway? >=20 > Cc: Andrew Morton > Cc: Michal Hocko > Cc: Vlastimil Babka > Cc: Oscar Salvador > Cc: Mel Gorman > Cc: Mike Rapoport > Cc: Dan Williams > Cc: Pavel Tatashin > Cc: linux-kernel@vger.kernel.org > Signed-off-by: Anshuman Khandual > --- > mm/page_alloc.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) >=20 > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index 15c2050c629b..fbf93ea119d2 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -8206,8 +8206,10 @@ bool has_unmovable_pages(struct zone *zone, struct p= age *page, int count, >=20 > page =3D pfn_to_page(check); >=20 > - if (PageReserved(page)) > + if (PageReserved(page)) { > + reason =3D "Reserved page"; > goto unmovable; > + } >=20 > /* > * If the zone is movable and we have ruled out all reserved > --=20 > 2.20.1 >=20