Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3618687imu; Tue, 18 Dec 2018 01:07:44 -0800 (PST) X-Google-Smtp-Source: AFSGD/VS4j8DHeatqyFGn/EdGlTBTXuYOXI1auuG/S1oMN+ALdHnGdnMMSdTRJ5+Y+7Rh2wTa9DK X-Received: by 2002:a63:cc4e:: with SMTP id q14mr14883907pgi.291.1545124064494; Tue, 18 Dec 2018 01:07:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545124064; cv=none; d=google.com; s=arc-20160816; b=seGcrWV+z4cc1lz8K9XaItKGlM7Sc8uVwB2gJQ1D79cIv2pGTujBhGwLfnzCVdhFWp BL3TFtUJ/MNZkp35g45o7NW0niL/ZvqfEaMxRbKBYmkralK8kWrOf5p082rwggkJNHxV 5LgqwT4w26naVpEHlIQKDhx59ZOuLM8UPhBk8GNBARLBDa2folWLHHmesi2bXpBqZ0F2 82aFIPeF1sctFeP6mfNg1bUz7KiA0HN5xXarX0ZZ/4cSW0Ui5IH2JP4IjOHyR4q4EzsF odjR146dhvkZnwmiShzL9oj9gyoKlvuU6TYZrFdRnEQN45SQ2yzVuK5qwo48TcnJkOBb q+rw== 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=JvEoQciOXIuvFooTjDRSJGyctzUVNBDfpQt6Dbw1oek=; b=RLlEEEDFfJv5xQOS7MRw6zG0gYizB33VWk97TAYg6hvtZmG3UZt2FYxa/7JEsq+7AS TL4Oq8JIM3qlqGPQhTlXCdMItgd5SQ+mOqqkB4CjMpyBkB1W8DvV79u3ns+0LUpYhs2n 4gRSvyA1adkTKOJMrlsUNJhimyOH2vzslgIJYL3f1XlK7f3as+iI/9Dg5tVyI/qlFJx+ fZBO+BvYzi9ZFN3WsZ61C92FzJDNoJV3RUyypotP3j6CZlahXubaOi32qmkCp6phzuWt mry9Dj/PF51H0cag7w/824Qix1ZlzrPlmr4KGacTQFmJTLOvm81UxQqGh3E9krZnHdex Lgaw== 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 f5si12432886plo.422.2018.12.18.01.07.29; Tue, 18 Dec 2018 01:07:44 -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 S1726484AbeLRJGf (ORCPT + 99 others); Tue, 18 Dec 2018 04:06:35 -0500 Received: from mx2.suse.de ([195.135.220.15]:49004 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726422AbeLRJGe (ORCPT ); Tue, 18 Dec 2018 04:06:34 -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 AD62FAC17; Tue, 18 Dec 2018 09:06:32 +0000 (UTC) Subject: Re: [PATCH 06/14] mm, migrate: Immediately fail migration of a page with no migration handler 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-7-mgorman@techsingularity.net> From: Vlastimil Babka Openpgp: preference=signencrypt Message-ID: <0ef5c1d0-1853-8fdb-1a68-7482297cb802@suse.cz> Date: Tue, 18 Dec 2018 10:06:31 +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-7-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: > Pages with no migration handler use a fallback hander which sometimes > works and sometimes persistently fails such as blockdev pages. Migration > will retry a number of times on these persistent pages which is wasteful > during compaction. This patch will fail migration immediately unless the > caller is in MIGRATE_SYNC mode which indicates the caller is willing to > wait while being persistent. Right. > This is not expected to help THP allocation success rates but it does > reduce latencies slightly. > > 1-socket thpfioscale > 4.20.0-rc6 4.20.0-rc6 > noreserved-v1r4 failfast-v1r4 > Amean fault-both-1 0.00 ( 0.00%) 0.00 * 0.00%* > Amean fault-both-3 2276.15 ( 0.00%) 3867.54 * -69.92%* This is rather weird. > Amean fault-both-5 4992.20 ( 0.00%) 5313.20 ( -6.43%) > Amean fault-both-7 7373.30 ( 0.00%) 7039.11 ( 4.53%) > Amean fault-both-12 11911.52 ( 0.00%) 11328.29 ( 4.90%) > Amean fault-both-18 17209.42 ( 0.00%) 16455.34 ( 4.38%) > Amean fault-both-24 20943.71 ( 0.00%) 20448.94 ( 2.36%) > Amean fault-both-30 22703.00 ( 0.00%) 21655.07 ( 4.62%) > Amean fault-both-32 22461.41 ( 0.00%) 21415.35 ( 4.66%) > > The 2-socket results are not materially different. Scan rates are > similar as expected. > > Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka > --- > mm/migrate.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/migrate.c b/mm/migrate.c > index df17a710e2c7..0e27a10429e2 100644 > --- a/mm/migrate.c > +++ b/mm/migrate.c > @@ -885,7 +885,7 @@ static int fallback_migrate_page(struct address_space *mapping, > */ > if (page_has_private(page) && > !try_to_release_page(page, GFP_KERNEL)) > - return -EAGAIN; > + return mode == MIGRATE_SYNC ? -EAGAIN : -EBUSY; > > return migrate_page(mapping, newpage, page, mode); > } >