Message ID | 20200224203057.162467-15-walken@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=jCko=4M=kvack.org=owner-linux-mm@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 11B7814BC for <patchwork-linux-mm@patchwork.kernel.org>; Mon, 24 Feb 2020 20:31:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D270D20675 for <patchwork-linux-mm@patchwork.kernel.org>; Mon, 24 Feb 2020 20:31:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="qSd+Be1x" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D270D20675 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 71DBF6B0099; Mon, 24 Feb 2020 15:31:36 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 6CCD06B009B; Mon, 24 Feb 2020 15:31:36 -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 5BC596B009C; Mon, 24 Feb 2020 15:31:36 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0100.hostedemail.com [216.40.44.100]) by kanga.kvack.org (Postfix) with ESMTP id 3EA266B0099 for <linux-mm@kvack.org>; Mon, 24 Feb 2020 15:31:36 -0500 (EST) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id EA419283A for <linux-mm@kvack.org>; Mon, 24 Feb 2020 20:31:35 +0000 (UTC) X-FDA: 76526166150.24.blade65_2b01f86fc2b36 X-Spam-Summary: 2,0,0,28e973a5ecad72c6,d41d8cd98f00b204,3pjjuxgykcfujx871a3bb381.zb985ahk-997ixz7.be3@flex--walken.bounces.google.com,,RULES_HIT:41:152:355:379:541:800:960:966:973:988:989:1260:1277:1313:1314:1345:1359:1437:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2196:2199:2393:2553:2559:2562:2914:3138:3139:3140:3141:3142:3152:3352:3865:3866:3867:3871:3872:4385:4470:5007:6120:6261:6653:9969:10004:10400:11026:11658:11914:12043:12048:12297:12438:12555:12895:13069:13311:13357:14096:14097:14181:14659:14721:21080:21444:21451:21627:21990:30054:30070:30090,0,RBL:209.85.214.202:@flex--walken.bounces.google.com:.lbl8.mailshell.net-62.18.0.100 66.100.201.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:23,LUA_SUMMARY:none X-HE-Tag: blade65_2b01f86fc2b36 X-Filterd-Recvd-Size: 3914 Received: from mail-pl1-f202.google.com (mail-pl1-f202.google.com [209.85.214.202]) by imf43.hostedemail.com (Postfix) with ESMTP for <linux-mm@kvack.org>; Mon, 24 Feb 2020 20:31:35 +0000 (UTC) Received: by mail-pl1-f202.google.com with SMTP id t17so5786090plr.13 for <linux-mm@kvack.org>; Mon, 24 Feb 2020 12:31:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=aQHjhY0mDnYI5tzJ1aaih4+nUKpBIvOZggMZVLjJ5uk=; b=qSd+Be1x/xF0eZERpmMHUh0PVlFuEx+lwGcxrVnc8RaNbbEEuSKcUgsikloLDS+hw5 hfVIqmee1ktIftTCZ0MHn5DWNaUs/zqvpG5QwPesVYWQ3xNZFIxk4kWPdmL9c8fUJu48 Nxc62O7ElzjhAGWqF2UFkdE+wkLVexJZ+AxUigEWa7ea+DAjKC4M12nwVr8YeoMHyATR BIOevdgy+OxPpSOzq4Q/ikU2tqxIpvEUD+kYvSAqGzsMO5rGCmm0ombZBx6YlMUNctPP 9HJbU5IJQhxaq6jau6UQfFm2iBd3p/p/rCEdRbaIxsKTjUKQEmDiipkmqwyzx00jqLVh u5cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=aQHjhY0mDnYI5tzJ1aaih4+nUKpBIvOZggMZVLjJ5uk=; b=IZ66S6vBXCOJBol8bINDl0yO1pEzLp56+bDwk0g/2GOm44iY1NWwTtFOdUgIjKWjdl KmP3SV8EbvCUINlS2z0yQ4s7UKgaP2xEKkFLIqeKOyNwrCBmk5yYAn057zbAMKadLd44 cUSZJWxmOd72CJE4G3nL6d4PoDHgfKM+vstwyPDoqH9LKG6/HmqZF3ktat3wqiGvukAc cWybB9vrNRkOjnl+WEYGMvlpoLUb0cJXunfOWPWguJWbsbh9Uh5p3JR02PLq5JpPF/5X 6d2W7yThg36X0rFJhkgM5vOrX6ub7KKN4zqZiwhmGMC5LlhQRDy6yav+Dz7sFMRjOsD+ uPMA== X-Gm-Message-State: APjAAAVn0gcR+ch2njM7orOW1m18xWC/zeBBcVBjTHPszMBwTo6TjcCC WCyi3MrHPGS1/YCU70jUi9A+aQAgO08= X-Google-Smtp-Source: APXvYqw11QSNDHKxFz8qupRHbZgAfTro9i+dLHt/T68ekgI2YqL5K+bbOWpSh5paSukVUzCEGlpOy63fVfQ= X-Received: by 2002:a63:f744:: with SMTP id f4mr56060836pgk.345.1582576294195; Mon, 24 Feb 2020 12:31:34 -0800 (PST) Date: Mon, 24 Feb 2020 12:30:47 -0800 In-Reply-To: <20200224203057.162467-1-walken@google.com> Message-Id: <20200224203057.162467-15-walken@google.com> Mime-Version: 1.0 References: <20200224203057.162467-1-walken@google.com> X-Mailer: git-send-email 2.25.0.265.gbab2e86ba0-goog Subject: [RFC PATCH 14/24] mm/swap_state: disable swap vma readahead From: Michel Lespinasse <walken@google.com> To: Peter Zijlstra <peterz@infradead.org>, Andrew Morton <akpm@linux-foundation.org>, Laurent Dufour <ldufour@linux.ibm.com>, Vlastimil Babka <vbabka@suse.cz>, Matthew Wilcox <willy@infradead.org>, "Liam R . Howlett" <Liam.Howlett@oracle.com>, Jerome Glisse <jglisse@redhat.com>, Davidlohr Bueso <dave@stgolabs.net>, David Rientjes <rientjes@google.com> Cc: linux-mm <linux-mm@kvack.org>, Michel Lespinasse <walken@google.com> Content-Type: text/plain; charset="UTF-8" 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: <linux-mm.kvack.org> |
Series |
Fine grained MM locking
|
expand
|
diff --git mm/swap_state.c mm/swap_state.c index 8e7ce9a9bc5e..c9cdfd9c785e 100644 --- mm/swap_state.c +++ mm/swap_state.c @@ -298,6 +298,12 @@ void free_pages_and_swap_cache(struct page **pages, int nr) static inline bool swap_use_vma_readahead(void) { + /* + * vma readahead overwrites vma->swap_readahead_info, + * which requires some form of vma locking... + */ + return false; + return READ_ONCE(enable_vma_readahead) && !atomic_read(&nr_rotate_swap); }
This change disables swap vma readahead. This is because swap_ra_info() updates vma->swap_readahead_info, which is not feasible when operating on pseudo-vmas. This is a crude temporary solution. It may be possible to use a per-mm swap_readahead_info instead, or if not, to explicitly fetch the vma of record when updating the swap readahead statistics. Signed-off-by: Michel Lespinasse <walken@google.com> --- mm/swap_state.c | 6 ++++++ 1 file changed, 6 insertions(+)