Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp53133ybn; Thu, 3 Oct 2019 01:15:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqziWTm0nsQ51VknGxrtta+lXD9ABmvRBqUxzZDNdUtvJJZe9/dIZU44nl690qcEV4sBwmka X-Received: by 2002:a17:906:79ca:: with SMTP id m10mr6498393ejo.292.1570090517013; Thu, 03 Oct 2019 01:15:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570090517; cv=none; d=google.com; s=arc-20160816; b=tKwPqg8OM6G4i0CaKivMUrIdmI2LI1+W2qFRx39Dd+/wCnw4P5TmiRSMC6Y+q119Mu tO+9oQvKnUh+6KEwv3awkdTWJraT3G4UGjGJUsG8nzUfZbl4w4nj2M3psjyGmtqDqRxF VIxcPPoW9DpXA7a+uPkfB27ZHZJd1XwpDvbUXqYycorT68JOL6t/urxaoECrzpPfAP91 IjlTFR0EfmHc0/GZenMwWf+tk8u+CtSRbwwB9enPjhxdpbFdnqQbHMKbUqM64xJIP2JB ZjiC/JnmqHD1MeBydCa0K2ESqCpzWHvr4NhN2qQrIfj9j/rhRZ9Gr8i+676ZbtK4naFj XLQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=tdKhcj+Jasmhai0QMuXGgD7Tov+bVvOuhoK9R9y1FaA=; b=Gn97zxM8YWXjjla4uWJbvrOSQaBwQ8IScG+dZ/TEOZ1/RLc0/rRB1JgioQscyMwEMh iUM2bGc2rEj3ecZ0hTdixAS2FN4zmqHO0sRTwL1T0oYr6uh09YZgHX9SC46qzpDRzVtm mD6YdhF/WbOZec4KKPldO4Tvd72JKptPr/cGtFw5QS5zAQtChqwubYCvWkc3o5woFeS/ +nIKKCi4FdOGJDdcmT73ky+W2Z0kv9oTG9S+m1iz2kAjMu3XhbxzGybtCKVCD2wHQGra VL68zEq3NPnh3Ub9dFlCiWSSSDEGQUqUt+2VX80Cp6CHTDU9IPlzO5aVCiUsT5+3N7oP 2IbQ== 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 h91si1008807edd.270.2019.10.03.01.14.29; Thu, 03 Oct 2019 01:15:17 -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 S1728773AbfJCIKz (ORCPT + 99 others); Thu, 3 Oct 2019 04:10:55 -0400 Received: from foss.arm.com ([217.140.110.172]:37866 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725827AbfJCIKz (ORCPT ); Thu, 3 Oct 2019 04:10:55 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AA7EB28; Thu, 3 Oct 2019 01:10:54 -0700 (PDT) Received: from p8cg001049571a15.blr.arm.com (p8cg001049571a15.blr.arm.com [10.162.40.180]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 384443F739; Thu, 3 Oct 2019 01:10:50 -0700 (PDT) From: Anshuman Khandual To: linux-mm@kvack.org Cc: Anshuman Khandual , Andrew Morton , Michal Hocko , Vlastimil Babka , Oscar Salvador , Mel Gorman , Mike Rapoport , Dan Williams , Pavel Tatashin , linux-kernel@vger.kernel.org Subject: [PATCH] mm/page_alloc: Add a reason for reserved pages in has_unmovable_pages() Date: Thu, 3 Oct 2019 13:40:57 +0530 Message-Id: <1570090257-25001-1-git-send-email-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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". 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(-) 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 page *page, int count, page = pfn_to_page(check); - if (PageReserved(page)) + if (PageReserved(page)) { + reason = "Reserved page"; goto unmovable; + } /* * If the zone is movable and we have ruled out all reserved -- 2.20.1