From patchwork Fri Dec 14 23:03:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mel Gorman X-Patchwork-Id: 10731783 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 7012113AD for ; Fri, 14 Dec 2018 23:03:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 236F82D639 for ; Fri, 14 Dec 2018 23:03:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 175822D63D; Fri, 14 Dec 2018 23:03:32 +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 9FA3A2D639 for ; Fri, 14 Dec 2018 23:03:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CA2E88E0216; Fri, 14 Dec 2018 18:03:14 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id BE75F8E021B; Fri, 14 Dec 2018 18:03:14 -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 83D638E021F; Fri, 14 Dec 2018 18:03:14 -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 0CF008E021C for ; Fri, 14 Dec 2018 18:03:14 -0500 (EST) Received: by mail-ed1-f71.google.com with SMTP id f31so281587edf.17 for ; Fri, 14 Dec 2018 15:03:14 -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=tHWZXRJo9uzt9m49/dCLzcy4vshcjBPRtaI+9Pk2x5Y=; b=J/4gHY7gw0vNq0FoRh2nWKqCbwyeoe1utvjNCzstlO2wDV5bfGcStgWnHIa4YrT4ZW /s5BFWEkGmjQVllKK+XZAJ98irrvxN7X99rCE/5CX/vTFTzZ6GWUh8ZA9BoUJ57axJyO GfJpvLeAQByuAA/O0uB7eD1pf0dXRHxBVnxsoXzRewoQ9S/UbZUUr5St3WJfh7VP/LM/ bQOlEYGp5FiYz5vYw+UAYD75mxBms5YUqiZ4vfh/dLeH6k+uTQcjrsKDbKGuSZ3z19Va pfp4CicCkj5QULUlKfex3F57k2tCCN4wbia4G5u29Fyi6ony8aiJTbRxfwAJkIFpM493 kpCw== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of mgorman@techsingularity.net designates 46.22.139.230 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net X-Gm-Message-State: AA+aEWaQFqmm2w9Z5wgc1FC6nkvuqrataqCST1Vv6M2u8IVAAOTdzvEn x7ckpyAmMwrQIkjGI86krVvggGMc7tgEKGsv7T4gePC0SqG7ZIvsuQRmxcAKe+iaNrL5Eo6iqLK 8WzWcva5oVWdsdQvbaogAB7/1amHwvHIYMy8y8fObiBSqEMVAocXyTGMvCDxcY141lA== X-Received: by 2002:a17:906:77c1:: with SMTP id m1-v6mr3549408ejn.233.1544828593540; Fri, 14 Dec 2018 15:03:13 -0800 (PST) X-Google-Smtp-Source: AFSGD/XiZiUaD9t14W82uRoW6UGNFxx9lMJSe0yPdS0ER7EU7T8/cNZpFTe9OvjgikLPSIahk0jx X-Received: by 2002:a17:906:77c1:: with SMTP id m1-v6mr3549386ejn.233.1544828592613; Fri, 14 Dec 2018 15:03:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544828592; cv=none; d=google.com; s=arc-20160816; b=lCoq2Ksg8WcfRoxsN79Kp9Mjlmu9w7FX+BRMJsMwXmyhTts+HI5XGB5BB7Qk4rr7Ub 3NowWBRul5elu3m5FIcXJBGo6BDH80i5fVUHPM5t/EeN4hvvREJuuhfI6qweSVF54WHw BPzx9d1Su43OSGr4s9bq0X0uy05v2BijIM8dCIZTaXy+dtyg+GiEYUQSIN+WRgkOVXxy rztzW+SbVn6FGPyBI4qwAac+VFyvRm+q2fH+PwK7cqZY/OQDC8uN1kkfQPmegsuC9Gaw SKMm8dWTsXlrpXjkLDzFBXjyuBKY4tNN4m855SAdB7LC1/QFna9EbCXOAQGLiAa4X75E V0hA== 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=tHWZXRJo9uzt9m49/dCLzcy4vshcjBPRtaI+9Pk2x5Y=; b=JsH3v/3yqV7WQ6QpBQ6zJi3nXegPIFIHfH5YH7mERNbZ2O3Bylm/sVMMxZ7+G8DrMp IZhoxWV9c3ueE8dB5KvMKLjKKBBoht9dpUr7LUV8HwnENkI+QMvRfUBpCiC4Qd+cJQ2v 4Do1E+NeLLYgy26mzSunmLLSfCSQS7ARwQvbkJHnBGtGOOfoCNu+b6dhikIFCKqZOOQM jR7mSmUsu5wyqX27xEHD+gtQ3Y0Dix6UlYT/MdbMS1hmbrzhBn/zX1Gb/lP88JFGufko c4iDN9hIn9vmCfd6+0xNlHeFcd7vmwWIMQc2taOYFrES+5XVp8vnOmauUf8xZ8qobBNq cnYw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of mgorman@techsingularity.net designates 46.22.139.230 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net Received: from outbound-smtp13.blacknight.com (outbound-smtp13.blacknight.com. [46.22.139.230]) by mx.google.com with ESMTPS id k13si643824edl.377.2018.12.14.15.03.12 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Dec 2018 15:03:12 -0800 (PST) Received-SPF: pass (google.com: domain of mgorman@techsingularity.net designates 46.22.139.230 as permitted sender) client-ip=46.22.139.230; Authentication-Results: mx.google.com; spf=pass (google.com: domain of mgorman@techsingularity.net designates 46.22.139.230 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net Received: from mail.blacknight.com (unknown [81.17.254.10]) by outbound-smtp13.blacknight.com (Postfix) with ESMTPS id 4AFED1C1D19 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> 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 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 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); }