From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E387EC38142 for ; Fri, 27 Jan 2023 23:27:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5D9316B0071; Fri, 27 Jan 2023 18:27:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5891B6B0073; Fri, 27 Jan 2023 18:27:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4509F6B0074; Fri, 27 Jan 2023 18:27:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 3091D6B0071 for ; Fri, 27 Jan 2023 18:27:10 -0500 (EST) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 0027EA017D for ; Fri, 27 Jan 2023 23:27:09 +0000 (UTC) X-FDA: 80402166978.19.AAE756C Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf16.hostedemail.com (Postfix) with ESMTP id 70B5E180009 for ; Fri, 27 Jan 2023 23:27:07 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=ZpNA9pM7; dmarc=none; spf=none (imf16.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1674862028; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Vihkrb/8ANYH1iNq91cTcIbYX7mO3m/5JUyTib5RU5Y=; b=2fiajX80Blk95AMjBGYgnM6mDfAzK+XTym36w/C49OoAxDi28IS5b0WKqpigZESOql0i1D 2cjJ5FdyVILjYa3UwmFJR6ljHHMGOiRedjrk2oCxUkQJtx2vbk0uU/Ecq9Ky6bzNcd2b/K EfSM1BWCuOh/m8WCo8FtRZP39VJJ5lc= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=ZpNA9pM7; dmarc=none; spf=none (imf16.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1674862028; a=rsa-sha256; cv=none; b=mYelGtUX43BOtKzYSnP4kCmn4ACsZIcKaO8hRDIY5og9yU3qzTgRVYwiFMGYtXnE8PTDPl tZnLPVvG87gDQQwDeoR43VmGQtxZYyJfIXNa/+fUAc1J8/gjx2pZeqk2HHOH5d8UbszbL9 EBmtza7sveIYbce+QRiQAku63/4rSBE= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=Vihkrb/8ANYH1iNq91cTcIbYX7mO3m/5JUyTib5RU5Y=; b=ZpNA9pM7rggKdAVK5gNlhc+sqr 01/yb2KQYHe6I0NkLIx6BEvNI8ay8afAm7heB8PJvmd95lyUpT/T0QijDh0j6UxOkdP6aXbKlXUL4 PzR+wk6qMZKvfPA0cZVX2jLjNnOz+pJlrxw3cfiFLJS5MjzL/AhhdAujmZu+BWxTaLFQ4VsFS5Wfc CQKJ4gesuFMUJC03n5N6MeeoXRdYZbEsx+/bHN5Tx16+41owCj6ekkrhHuZJ5S2xXlBUtA5XYqtZh EeFR5zlhwHlFQnn2Wx0v/cuyb8DUliBuurHPCmE5mhYJpg4ym3huRP1QyGuSBpgiwrlwo/j/+s+Xl 2Vqh0F0g==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1pLY6t-0088UT-Lz; Fri, 27 Jan 2023 23:26:19 +0000 Date: Fri, 27 Jan 2023 23:26:19 +0000 From: Matthew Wilcox To: Andrew Morton Cc: Suren Baghdasaryan , michel@lespinasse.org, jglisse@google.com, mhocko@suse.com, vbabka@suse.cz, hannes@cmpxchg.org, mgorman@techsingularity.net, dave@stgolabs.net, liam.howlett@oracle.com, peterz@infradead.org, ldufour@linux.ibm.com, paulmck@kernel.org, mingo@redhat.com, will@kernel.org, luto@kernel.org, songliubraving@fb.com, peterx@redhat.com, david@redhat.com, dhowells@redhat.com, hughd@google.com, bigeasy@linutronix.de, kent.overstreet@linux.dev, punit.agrawal@bytedance.com, lstoakes@gmail.com, peterjung1337@gmail.com, rientjes@google.com, axelrasmussen@google.com, joelaf@google.com, minchan@google.com, rppt@kernel.org, jannh@google.com, shakeelb@google.com, tatashin@google.com, edumazet@google.com, gthelen@google.com, gurua@google.com, arjunroy@google.com, soheil@google.com, leewalsh@google.com, posk@google.com, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, x86@kernel.org, linux-kernel@vger.kernel.org, kernel-team@android.com Subject: Re: [PATCH v2 00/33] Per-VMA locks Message-ID: References: <20230127194110.533103-1-surenb@google.com> <20230127145138.8cc44bf00ebf289dffec0975@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230127145138.8cc44bf00ebf289dffec0975@linux-foundation.org> X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 70B5E180009 X-Stat-Signature: yc49rw483guxpweu5387x3nqw66ey56r X-HE-Tag: 1674862027-915591 X-HE-Me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+h+5a6Pwoau+DFAG5TtXegx4MDHKD5di6zY1dda66ac/NSHDHdfo0Mo7BPaODxh/p3xcqhlNwyFxQV8injXvZ6nSFJaTzevQSpnfotNSe7jM4A== 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: On Fri, Jan 27, 2023 at 02:51:38PM -0800, Andrew Morton wrote: > On Fri, 27 Jan 2023 11:40:37 -0800 Suren Baghdasaryan wrote: > > > Per-vma locks idea that was discussed during SPF [1] discussion at LSF/MM > > last year [2], which concluded with suggestion that “a reader/writer > > semaphore could be put into the VMA itself; that would have the effect of > > using the VMA as a sort of range lock. There would still be contention at > > the VMA level, but it would be an improvement.” This patchset implements > > this suggested approach. > > I think I'll await reviewer/tester input for a while. > > > The patchset implements per-VMA locking only for anonymous pages which > > are not in swap and avoids userfaultfs as their implementation is more > > complex. Additional support for file-back page faults, swapped and user > > pages can be added incrementally. > > This is a significant risk. How can we be confident that these as yet > unimplemented parts are implementable and that the result will be good? They don't need to be implementable for this patchset to be evaluated on its own terms. This patchset improves scalability for anon pages without making file/swap/uffd pages worse (or if it does, I haven't seen the benchmarks to prove it). That said, I'm confident that I have a good handle on how to make file-backed page faults work under RCU.