Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3571598imu; Tue, 18 Dec 2018 00:09:19 -0800 (PST) X-Google-Smtp-Source: AFSGD/Vywm9woz4Z/HYyz74oUD7MIDe7AMnHgON2uGQXhym80MutZnNKcjmakHhOyrEFf7OkXbbW X-Received: by 2002:a65:6645:: with SMTP id z5mr15076518pgv.351.1545120559899; Tue, 18 Dec 2018 00:09:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545120559; cv=none; d=google.com; s=arc-20160816; b=OUmYXKFk3L4K8pBvB5YTDKCbVYye+KjqhPOBqtaBtwpFTN06VJPYds8ue3CbQdzd50 u9wSfMSiPSoyhWgwtUr4hNoUvoUhcE/npu7N7DJ6swZNSvrziTbwoCu+T//tMvG7M40P CjHYhgZxG5FXzXB5OeyuS4kNEA7DzfyPEh0lrt0xy360P7UcUUZDgnaoCKU7R8dvRBMt 3Pa3/fHlciLX35dtLhTbVmgvbFTEjZZBdYFmEqSCWAi4utuFA9FEPwbCCc2sFqZBrAr9 AUrrV0DUnWkNOijHFUevk8arELf+5grJyDg016KGhHt+r90JNCKBqlLV0N1qPVxp1JUh raPw== 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:openpgp:from:references:cc:to:subject; bh=WEEr2zp9+WxUhlmS9YzqxhIqxY7N4O3Z68ZFaZsWlOA=; b=Kj/f6aX2YZE9JkjAkviWkS8coy/hAOktI8vYQXcxqqJ3TZ4LlacB1umzk8azDPpATY 2uGyyJaemV3iYovLA57PMf/xAF8Bfj/H2RQ5P34e7oGzeHxOdVu4IboLNSLYFLCQxtpV ILoQFczp1xTcxNU3Kq4b45ohhNymXwkxrKx22vJ3NyylwTHTabmsT20lYcu1xYHfF29t 3HArhWgUeVlf17T8bypVfmIjaBXPYP/EjRGtcKsv5UzwVJhxugC1rimpGX0+ymj/rYQ/ QQqJ+nrh5KPWWhabXuhyBvOSUccRDl3xaurLWapeD5F218cLpQZ66e/2dwAnqZLRj8mj kdyg== 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 o16si12944176pgd.117.2018.12.18.00.09.03; Tue, 18 Dec 2018 00:09:19 -0800 (PST) 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 S1726526AbeLRIIF (ORCPT + 99 others); Tue, 18 Dec 2018 03:08:05 -0500 Received: from mx2.suse.de ([195.135.220.15]:40618 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726316AbeLRIIF (ORCPT ); Tue, 18 Dec 2018 03:08:05 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 49698AF63; Tue, 18 Dec 2018 08:08:03 +0000 (UTC) Subject: Re: [PATCH 05/14] mm, compaction: Skip pageblocks with reserved pages To: Mel Gorman , Linux-MM Cc: David Rientjes , Andrea Arcangeli , Linus Torvalds , Michal Hocko , ying.huang@intel.com, kirill@shutemov.name, Andrew Morton , Linux List Kernel Mailing References: <20181214230310.572-1-mgorman@techsingularity.net> <20181214230310.572-6-mgorman@techsingularity.net> From: Vlastimil Babka Openpgp: preference=signencrypt Message-ID: Date: Tue, 18 Dec 2018 09:08:02 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.3 MIME-Version: 1.0 In-Reply-To: <20181214230310.572-6-mgorman@techsingularity.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/15/18 12:03 AM, Mel Gorman wrote: > Reserved pages are set at boot time, tend to be clustered and almost > never become unreserved. When isolating pages for migrating, skip > the entire pageblock is one PageReserved page is encountered on the > grounds that it is highly probable the entire pageblock is reserved. Agreed, but maybe since it's highly probable and not certain, this skipping should not be done on the highest compaction priority? > The impact depends on the machine and timing but both thpscale and > thpfioscale when using MADV_HUGEPAGE show a reduction of scanning and > fault latency on a 1-socket machine. The 2-socket results were too > noisy to draw any meaningful conclusion but it's safe to assume less > scanning is useful. > > 1-socket thpfioscale > 4.20.0-rc6 4.20.0-rc6 > mmotm-20181210 noreserved-v1r4 > Amean fault-base-1 1481.32 ( 0.00%) 1443.63 ( 2.54%) > Amean fault-huge-1 1118.17 ( 0.00%) 981.30 * 12.24%* > Amean fault-both-1 1176.43 ( 0.00%) 1052.64 * 10.52%* > > Compaction migrate scanned 3860713 3294284 > Compaction free scanned 613786341 433423502 > Kcompactd migrate scanned 408711 291915 > Kcompactd free scanned 242509759 217164988 > > Signed-off-by: Mel Gorman > --- > mm/compaction.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/mm/compaction.c b/mm/compaction.c > index 3afa4e9188b6..8134dba47584 100644 > --- a/mm/compaction.c > +++ b/mm/compaction.c > @@ -827,6 +827,13 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn, > goto isolate_success; > } > > + /* > + * A reserved page is never freed and tend to be > + * clustered in the same pageblocks. Skip the block. > + */ > + if (PageReserved(page)) > + low_pfn = end_pfn; > + > goto isolate_fail; > } > >