Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp139527ybn; Thu, 3 Oct 2019 02:53:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqwmmuiE3oF7GPGeLrIq1CvxP27+Vae6btcJwRUPL7s87KlAzyJRg6FCfmGxTzFdo2jSsYK3 X-Received: by 2002:a05:6402:16d5:: with SMTP id r21mr8356785edx.71.1570096439225; Thu, 03 Oct 2019 02:53:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570096439; cv=none; d=google.com; s=arc-20160816; b=l9VhLmuDoAmoQW0H4LloUMYYQVuzB0uBIM6LmcJ3eCJJbiXvxFQ6QtmtDA+eppaK17 VVf9YnQciWib6ULyqlzTLbeFUT7ke9d4lbCzm49fZyWur/niu3UWjr4bE+MOv7RQ0XLT HzNDniIfzZGkQ8iQMhdhdjYKh31N8712blGyr1IU/lQpR8t48apMHWMIF+30ZFs6u2OR ggQtiBLHlGzaI7fq7dfWXMtU0ybUff4tb4G9AAAZ9eT4PYp0xoocAHRiaf2QJAeJiiG4 AyEqwIY8v/hfcTKPBhc28+7Wx+67mse+HiXmm6EMRVJ+ek/rJgv42QZBJDtbJQIRJJgm FWkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=eq30Ezi9SSueO83VlEKRb3L5umydWRL6uMONY7CN5AQ=; b=fznvCKBtekVz9IR4wn1IBIXbwSCX3mkvTUHvjnJENFzdTtm5v8PzffdsCHJpkkC+QT OjYAw7kT1qKQxD0H9q+dVWzWgiMn0w+PvLQ+OBNTZk4mqu1dqQoM15xjQgOl8+0Y8WCt wtqtJzHZs7cpivrU654CgzaAN1xVQhu6mFNybNJZL63MTX3UfbnGhCtMCF53cc+Wq6QZ hdFAAHAczpsav72c4Ow+WbcLnNfW5j/L12frh/6JmNuCZYfERHw/GKpUNqU8J9MfB7hs U1e3zNtxCOHJGBd2QzKE2DaAC1l7pVIWn3x93EB9yrW9uib+Vr4jZySuZ7SDghS3Dlok RmwA== 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 y1si907493ejr.272.2019.10.03.02.53.30; Thu, 03 Oct 2019 02:53:59 -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 S1729643AbfJCJxD (ORCPT + 99 others); Thu, 3 Oct 2019 05:53:03 -0400 Received: from foss.arm.com ([217.140.110.172]:39940 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729601AbfJCJxA (ORCPT ); Thu, 3 Oct 2019 05:53:00 -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 5B9D91000; Thu, 3 Oct 2019 02:52:59 -0700 (PDT) Received: from [10.162.40.180] (p8cg001049571a15.blr.arm.com [10.162.40.180]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 84E9F3F739; Thu, 3 Oct 2019 02:52:56 -0700 (PDT) Subject: Re: [PATCH] mm/page_alloc: Add a reason for reserved pages in has_unmovable_pages() To: Qian Cai 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 References: <1570090257-25001-1-git-send-email-anshuman.khandual@arm.com> <7FA7CBE1-E0A9-40E2-B3CA-0896F6D491E5@lca.pw> <37b43978-5652-576c-8990-451e751b7c67@arm.com> From: Anshuman Khandual Message-ID: Date: Thu, 3 Oct 2019 15:23:18 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <37b43978-5652-576c-8990-451e751b7c67@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/03/2019 03:02 PM, Anshuman Khandual wrote: > > On 10/03/2019 02:35 PM, Qian Cai wrote: >> >>> On Oct 3, 2019, at 4:10 AM, Anshuman Khandual wrote: >>> >>> 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’t this redundant as it dumps the flags in dump_page() anyway? > Even though page flags does contain reserved bit information, the problem > is that we are explicitly printing the reason for this page dump. In this > case it is caused by the fact that it is a reserved page. > > page dumped because: > > The proposed change makes it explicit that the dump is caused because a > non movable page with reserved bit set. It also helps in differentiating > between reserved bit condition and the last one "if (found > count)" Instead, will it better to rename the reason codes as 1. "Unmovable (CMA)" 2. "Unmovable (Reserved)" 3. "Unmovable (Private/non-LRU)"