From patchwork Fri Jan 18 17:51:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mel Gorman X-Patchwork-Id: 10771363 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CB36291E for ; Fri, 18 Jan 2019 17:52:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B845D2FC07 for ; Fri, 18 Jan 2019 17:52:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ABE102FEF7; Fri, 18 Jan 2019 17:52:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6318A2FC07 for ; Fri, 18 Jan 2019 17:52:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 90D048E0014; Fri, 18 Jan 2019 12:52:50 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 8BB548E0002; Fri, 18 Jan 2019 12:52:50 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7D1248E0014; Fri, 18 Jan 2019 12:52:50 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by kanga.kvack.org (Postfix) with ESMTP id 26D288E0002 for ; Fri, 18 Jan 2019 12:52:50 -0500 (EST) Received: by mail-ed1-f71.google.com with SMTP id e29so5312915ede.19 for ; Fri, 18 Jan 2019 09:52:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=C0isV1ZJDgqFU3QoOVAtWQlnGfgiq1t7rqJXM+ekiIs=; b=fVXp9op+ocm/5jCnIKhmTBKDUHvrLApNI4WFw0ntLCgMIqWOyQ2f7cXTFK6nFY68Tn 2Tdt0NjlxODzfTLiDWmzZEdzb4EPn5P15XtVYD9lnmnEJ+14UyyXcNTylElW4Lgg4zqv b5QXei2CbcHzlNkHAZXNnu6d6yLhhD1XCmkzP/EUM04YsiqYB/kXGoTuNllzgiTg3Leb 2MOJOFZf+0obP4MWrd1XBlsoT1VfaXkdvZuuuYNm1A/tIQpGonIF8oSc4qiYoeKGB7Kc JHc94FupIqZ8GGtvV9aguPf4qBE3ow0tErybSGqumBeQWBLS3+XGN+Dc1o6G1B6H3SQz DMvg== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of mgorman@techsingularity.net designates 46.22.139.233 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net X-Gm-Message-State: AJcUukfDF199oEwweX68/5hPMre3ZFFPLaMGINbSF31Z8JJ8yt4E0GOR dtDkwabSScLx/efRtkxQMHaKPkxh7xY3fwHADJj5AQPPDM5hRdwfImLoKqEy0VJlyL57vICqmnY OrVK+wymUhbR5efhIFYaZI6xt0DnwmDntDFam7IKVFcuabO3j4R6+hbsBy8aKJxcG7Q== X-Received: by 2002:a50:95ce:: with SMTP id x14mr16683941eda.204.1547833969638; Fri, 18 Jan 2019 09:52:49 -0800 (PST) X-Google-Smtp-Source: ALg8bN4Cb4zotVFM8CU96m20gtFKkX8rPKrT8ytuixYJPYZF1CltEdtstBfEzR1BQw4ueAvD2Wo6 X-Received: by 2002:a50:95ce:: with SMTP id x14mr16683887eda.204.1547833968647; Fri, 18 Jan 2019 09:52:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547833968; cv=none; d=google.com; s=arc-20160816; b=v3MXnIhnf1JgE9+r3rC+MyWH6A+ZaMfFh+gAPILkbQ6v7JhdO8mWX4AREZZDw1C0R5 v2rnXze60hzfQJf84Zq0YSKW6UevV09VfzFswfu4H42C8HMFH1bwJ773Ik57MRtr7hhP HMr6Jo//5bPKLIiCO4ne3pxCuxll3L3t51ZjapT2fDR1UHmSvhGQjJSWAZAtbpAzaXWK qOGcxVUMoUV1fFyrVv/+ygI1aGhzENjnKZTc8T2ZXSUuJ1EK+NrANcxGLtxpZZiJLK9T /o9rzpmrY+YJj0DMt1Lqz/dGuU2wOBnr8b4THLouo1NrF1l7p0lnECkK6YUUN+gDxsZ2 +JCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from; bh=C0isV1ZJDgqFU3QoOVAtWQlnGfgiq1t7rqJXM+ekiIs=; b=A9VQW+U+/A1NPMtPkKUmY2Fw2kGzGXsDEljqWaLHg3sAULVtm+QJOpQJWZN0IQDZwd rVKjiwD30CRjlTjX/Y/9zyOa50oUTszLIpa2F6dhwECT1mbNvZzzan54/1uqbOztZtSJ fpI8R6WIW9dkLkKs7cYOC2uTzwbSCdJCHS5IE6tHWBxyYUPS5bqg4igRSULlqr3qymK4 6dh927Li6Q29LRD07KR26dhorig59mAzBpmzr3dNxcl1D7gEjcU2Cms4V9olbyzogSXR gCREx2t+0kEZHq27oNLDTXIwC0XghiRfvKvO2lyouZfMOsd1CGYp2pnaK0ofqaOgUazG 3Idw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of mgorman@techsingularity.net designates 46.22.139.233 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net Received: from outbound-smtp16.blacknight.com (outbound-smtp16.blacknight.com. [46.22.139.233]) by mx.google.com with ESMTPS id m3-v6si1788975ejb.316.2019.01.18.09.52.48 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jan 2019 09:52:48 -0800 (PST) Received-SPF: pass (google.com: domain of mgorman@techsingularity.net designates 46.22.139.233 as permitted sender) client-ip=46.22.139.233; Authentication-Results: mx.google.com; spf=pass (google.com: domain of mgorman@techsingularity.net designates 46.22.139.233 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net Received: from mail.blacknight.com (pemlinmail03.blacknight.ie [81.17.254.16]) by outbound-smtp16.blacknight.com (Postfix) with ESMTPS id 341701C35B5 for ; Fri, 18 Jan 2019 17:52:48 +0000 (GMT) Received: (qmail 750 invoked from network); 18 Jan 2019 17:52:48 -0000 Received: from unknown (HELO stampy.163woodhaven.lan) (mgorman@techsingularity.net@[37.228.229.96]) by 81.17.254.9 with ESMTPA; 18 Jan 2019 17:52:48 -0000 From: Mel Gorman To: Andrew Morton Cc: David Rientjes , Andrea Arcangeli , Vlastimil Babka , Linux List Kernel Mailing , Linux-MM , Mel Gorman Subject: [PATCH 06/22] mm, migrate: Immediately fail migration of a page with no migration handler Date: Fri, 18 Jan 2019 17:51:20 +0000 Message-Id: <20190118175136.31341-7-mgorman@techsingularity.net> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20190118175136.31341-1-mgorman@techsingularity.net> References: <20190118175136.31341-1-mgorman@techsingularity.net> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Pages with no migration handler use a fallback handler which sometimes works and sometimes persistently retries. A historical example was blockdev pages but there are others such as odd refcounting when page->private is used. These are retried multiple times which is wasteful during compaction so this patch will fail migration faster unless the caller specifies MIGRATE_SYNC. This is not expected to help THP allocation success rates but it did reduce latencies very slightly in some cases. 1-socket thpfioscale 4.20.0 4.20.0 noreserved-v2r15 failfast-v2r15 Amean fault-both-1 0.00 ( 0.00%) 0.00 * 0.00%* Amean fault-both-3 3839.67 ( 0.00%) 3833.72 ( 0.15%) Amean fault-both-5 5177.47 ( 0.00%) 4967.15 ( 4.06%) Amean fault-both-7 7245.03 ( 0.00%) 7139.19 ( 1.46%) Amean fault-both-12 11534.89 ( 0.00%) 11326.30 ( 1.81%) Amean fault-both-18 16241.10 ( 0.00%) 16270.70 ( -0.18%) Amean fault-both-24 19075.91 ( 0.00%) 19839.65 ( -4.00%) Amean fault-both-30 22712.11 ( 0.00%) 21707.05 ( 4.43%) Amean fault-both-32 21692.92 ( 0.00%) 21968.16 ( -1.27%) 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 52b04c217e30..4512afab46ac 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -916,7 +916,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); }