Message ID | 20200224203057.162467-21-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 7627614BC for <patchwork-linux-mm@patchwork.kernel.org>; Mon, 24 Feb 2020 20:31:57 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 39AE420675 for <patchwork-linux-mm@patchwork.kernel.org>; Mon, 24 Feb 2020 20:31:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="AU368CxN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 39AE420675 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 438B16B00A5; Mon, 24 Feb 2020 15:31:51 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 3E7426B00A7; Mon, 24 Feb 2020 15:31:51 -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 2D5256B00A8; Mon, 24 Feb 2020 15:31:51 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0057.hostedemail.com [216.40.44.57]) by kanga.kvack.org (Postfix) with ESMTP id 151F86B00A5 for <linux-mm@kvack.org>; Mon, 24 Feb 2020 15:31:51 -0500 (EST) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id C960740D3 for <linux-mm@kvack.org>; Mon, 24 Feb 2020 20:31:50 +0000 (UTC) X-FDA: 76526166780.11.pet95_2d29d6d8d3645 X-Spam-Summary: 2,0,0,f98ebbf293654b4d,d41d8cd98f00b204,3ttjuxgykcgqycnmgpiqqing.eqonkpwz-oomxcem.qti@flex--walken.bounces.google.com,,RULES_HIT:41:152:355:379:541:800:960:973:988:989:1260:1277:1313:1314:1345:1359:1437:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:3138:3139:3140:3141:3142:3152:3352:3865:3866:3867:4321:5007:6120:6261:6653:7875:9969:10004:10400:11026:11658:11914:12048:12296:12297:12438:12555:12691:12737:12895:12986:13069:13255:13311:13357:14096:14097:14181:14659:14721:21080:21444:21451:21627:30054:30070,0,RBL:209.85.216.74:@flex--walken.bounces.google.com:.lbl8.mailshell.net-66.100.201.100 62.18.0.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:0,LUA_SUMMARY:none X-HE-Tag: pet95_2d29d6d8d3645 X-Filterd-Recvd-Size: 3793 Received: from mail-pj1-f74.google.com (mail-pj1-f74.google.com [209.85.216.74]) by imf49.hostedemail.com (Postfix) with ESMTP for <linux-mm@kvack.org>; Mon, 24 Feb 2020 20:31:50 +0000 (UTC) Received: by mail-pj1-f74.google.com with SMTP id m61so429803pjb.1 for <linux-mm@kvack.org>; Mon, 24 Feb 2020 12:31:50 -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=z16DDbSi2mlidnZSVglw5niyhSpDCRs/Um5U4i+lkyY=; b=AU368CxNh05E+RnW8j8LJToreludMvbIPfjSbyOjE410h+AEDBq4lcdU02XRZ5dqlV yMovG+YuZBeLd9iMdvOXvE2KaU2nb/p+8fpYQ+rAoFeZ0k671cqnMf5YHmbreNc6t1Jt LhrkydHad3wanJhSklnI+VyAxWJ4oqlFDMCrmiDHCgilp4yhbcYC3WPd0eCVJhNjSadB VFGCWgvPWNPXvALDuI9mLYc+sdEt4MH4CsVDR3lKOablI6sBvXk1RSwCc+tgfvrzRqxB iEjviyi7JZ8icX0ywMXYpyPz2GSjDKhrl0JyretpksBp2nmjfM8tLqB5hrBAFKlKExIG rN9Q== 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=z16DDbSi2mlidnZSVglw5niyhSpDCRs/Um5U4i+lkyY=; b=tTO87Kc+MX7yl33YDWYF2SUgUirl/nbDMd5lprVTS6Mey66f/NZmY0ti71MYeHiBCP OFgziTgAK25VtYT7DxN3W0aiM0CgGSXMOjTvQwFWUdqprb2t/hH/yRuEYAaIaDm80RWu go3rVXSkPX2SZ358iYeUP1jRNmZZ9LvfDxhyqSxc8+HGjLIBLEDKRFngT1QwG0LtRpxy c1vyLwuS2Tc4hBfq5/hMsnY6ZFJ13XpLnX/49A3gHNKX/P3sOk9YXfC6Y7N60RfZz8OC raO4s00HmTZM4okU55el57lbK+/Q+feV6M2U7sbfmxCPzZpb73MfIPu34HyRL5ew0916 T3/w== X-Gm-Message-State: APjAAAVFQ98x1cYi1fSb+QMWyajnZX+EJYAXVlQYhzNt5dZQTRP0jEJu xS6Pg29tajO8kKDpGq/BDETE0QehjLs= X-Google-Smtp-Source: APXvYqw6Wj+vrC/wZzxz5Y+UFj3bitqp5y4pCTUCJwXxqE+MJCm4xvDJo/gPbLXdL9zhQxV0QmTFoj2yFNA= X-Received: by 2002:a63:511:: with SMTP id 17mr55050691pgf.221.1582576309204; Mon, 24 Feb 2020 12:31:49 -0800 (PST) Date: Mon, 24 Feb 2020 12:30:53 -0800 In-Reply-To: <20200224203057.162467-1-walken@google.com> Message-Id: <20200224203057.162467-21-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 20/24] x86 fault handler: extend range locking to supported file vmas 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 arch/x86/mm/fault.c arch/x86/mm/fault.c index 1e37284d373c..ca30952896e1 100644 --- arch/x86/mm/fault.c +++ arch/x86/mm/fault.c @@ -1456,9 +1456,9 @@ void do_user_addr_fault(struct pt_regs *regs, /* * Fall back to locking the entire MM - * when operating on file vma. + * when the vm_ops do not support fine grained range locking. */ - if (!vma_is_anonymous(vma)) { + if (!vma_is_anonymous(vma) && !vma->vm_ops->fine_grained) { mm_read_range_unlock(mm, range); range = mm_coarse_lock_range(); goto retry;
Change the fault handler to operate with a fine grained range lock when operating on any of the explicitly supported file types. Signed-off-by: Michel Lespinasse <walken@google.com> --- arch/x86/mm/fault.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)