Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp91369imu; Fri, 14 Dec 2018 15:06:39 -0800 (PST) X-Google-Smtp-Source: AFSGD/W+sQpTCWuwBCu4S7kSiYeB3VMh0KCKjKNLUDI5doFP69FrUj7zAeC0MLDVdt6nA1mYuOPQ X-Received: by 2002:a63:5026:: with SMTP id e38mr4381687pgb.123.1544828799424; Fri, 14 Dec 2018 15:06:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544828799; cv=none; d=google.com; s=arc-20160816; b=ORIMcziouj6tul5Ba+3Lj2UcQfg0eoU+ZVcImjm6DcaneyhQ6mS8nhM2VYcKzhW9xV H6lSfUzQv6VpcrHKxtaHOne0FLfBNVb3boDP7ASkX2XhAFLIfde1XWL5x0drcklSL9+B u8L7CpVH6TLEUscSiF1jFMAXoVBz21S/t/oxdFOjZSYtDxEkOu1dMPT2wMF8nwbasdkG z88BOal8s5rQHvwvMG6BMAErtXHREzVaPbAh0gYfO3bXrS1j+tLISArMMfXiVoY4f5so Vsex5ZlOZEtM9sOrz9NRQmnr1NeSluTuQo2oumKPz6Yf0UWE3+mcibfrRN3H0LVsgy8+ zGug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=tHWZXRJo9uzt9m49/dCLzcy4vshcjBPRtaI+9Pk2x5Y=; b=Srscn9DotPRL7Nv6WyOUBgL9YV5JHeUmhUPlxq7+LpIYrezkNp7se2cLAq0vmS7KsS pSI61VEZ5pMj8Emlk+6enppuZR8SfE8O5pLOCmJMwUJ3CCKHq4E0F0fLnwZjQK1QOdsP sf1pQVfIdxECJW202t2TGxUCrBcOwXKIINzpWwuZOE7GPj2lYszd9hritDfvyf7yEfk8 7/aCdLoi7VgtflTj4j6HK7QIys0PQkaWwBPwTHO+4Fn9nqHexCOwYit7UjTqvp3P3SGd RNyHrIXqPK2vJy9wD2CsxfmcPa+kWIDM9nSB3gTa7UIPK5axWsDjqmoM1IWqGW4ZXeds /NbA== 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 q3si5284425plb.209.2018.12.14.15.06.24; Fri, 14 Dec 2018 15:06:39 -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 S1730904AbeLNXDq (ORCPT + 99 others); Fri, 14 Dec 2018 18:03:46 -0500 Received: from outbound-smtp10.blacknight.com ([46.22.139.15]:54583 "EHLO outbound-smtp10.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729789AbeLNXDN (ORCPT ); Fri, 14 Dec 2018 18:03:13 -0500 Received: from mail.blacknight.com (pemlinmail01.blacknight.ie [81.17.254.10]) by outbound-smtp10.blacknight.com (Postfix) with ESMTPS id 533C61C20A2 for ; Fri, 14 Dec 2018 23:03:12 +0000 (GMT) Received: (qmail 31262 invoked from network); 14 Dec 2018 23:03:12 -0000 Received: from unknown (HELO stampy.163woodhaven.lan) (mgorman@techsingularity.net@[37.228.245.71]) by 81.17.254.9 with ESMTPA; 14 Dec 2018 23:03:12 -0000 From: Mel Gorman To: Linux-MM Cc: David Rientjes , Andrea Arcangeli , Linus Torvalds , Michal Hocko , ying.huang@intel.com, kirill@shutemov.name, Andrew Morton , Linux List Kernel Mailing , Mel Gorman Subject: [PATCH 06/14] mm, migrate: Immediately fail migration of a page with no migration handler Date: Fri, 14 Dec 2018 23:03:02 +0000 Message-Id: <20181214230310.572-7-mgorman@techsingularity.net> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20181214230310.572-1-mgorman@techsingularity.net> References: <20181214230310.572-1-mgorman@techsingularity.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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%* 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 --- 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); } -- 2.16.4