Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1655142rwe; Fri, 2 Sep 2022 01:09:56 -0700 (PDT) X-Google-Smtp-Source: AA6agR7My/YkEvo0c5MzLX6p9eh1KhHyUP8vTQKrkBDEp7OzNdLUMbcfgUFq8vm9dJ0pj+zoJ39Z X-Received: by 2002:a05:6a00:a04:b0:534:d8a6:40ce with SMTP id p4-20020a056a000a0400b00534d8a640cemr35669594pfh.15.1662106195873; Fri, 02 Sep 2022 01:09:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662106195; cv=none; d=google.com; s=arc-20160816; b=DFW/bHrvUldeaDWBS8MNcOyWjKEV44bUmwovOrg7G/w1yLaZWI/a0o/dgJCKzO6csb 93riyaBkO07SQvQ3y7uopYYhb5TncSRyet1Dpb30Cb5hmpXPoJC0Zu+g1N7lzXaSH4V+ 48EdFD+UfjFm3XtZclYMDGc1hGvHf/kySmeF+GDIOnL4E2LD2q6LjhJOHIlGb2a9yKLc 6kE5JvI9VrLpXEKX0qwJoLHFMSp0Xd5sKmp9jiqSVHVP/fWnSznPKYlTAOayKHbAslcH 4uCijfleSqlbWrDLlgZC5WJejKFJ/hxZoG3zH+jNzixuJXxFI9MSkslygj3wph28vkaS X9jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=OTkZ6uS66u1w+Hbm6TtejxpZoX4M4S5NPkBcQcAWCKc=; b=bOPODlOXt4Y5IUoiHar8qhVlvEJKtePh7rNiCbVA3HXG1W1BGILesH7LGcB8ZtwMmj +JrhmV9X1Q9ibMQ4nfzAFxcldKQXp6M/upF7Nfo74R/oItpgDSJ+gp5h7DJ5bSYGhS+X pzJV7Mcw6g/cMW/1BnF10P8qiY90qzD9rFKeU/NiQISgYXhzcbTv9JeV7FqjHdo/6FZ1 QEEpDzeidhG0HzGU39gDAWLDw6U7cjqyL1ckj09YIP2GE1WmIqhn7kzSYiHBrhiwRHWJ s43F0NvZQqzR5x37re7XwseWWqR5UivEUFvZKx9IrATnH8Br6diL5JCr3arx3Ewmka68 X2Wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=PnZijlpR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 75-20020a63064e000000b004131f3e6e0esi1326080pgg.456.2022.09.02.01.09.45; Fri, 02 Sep 2022 01:09:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=PnZijlpR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235380AbiIBHns (ORCPT + 99 others); Fri, 2 Sep 2022 03:43:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234925AbiIBHnq (ORCPT ); Fri, 2 Sep 2022 03:43:46 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05A2EA833B for ; Fri, 2 Sep 2022 00:43:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=OTkZ6uS66u1w+Hbm6TtejxpZoX4M4S5NPkBcQcAWCKc=; b=PnZijlpR1pOR1iufsipFUsPYmX wbuCNPHruLPvnd9YD9OGZaAbljCpwQ375yyM4LxLPNodHP7yyl8nCBECEYTFiQVqc4YVxSJ/V2dlh O/8jbSYyMnq7pIMy+I3eQIfZaErVmTLPipUltIDJnf+p51iDa+Z64wSxdGbbuLpDZVmryFk/FF5GN cP5Tu6T2zNfa688WKGMlX+v33GIJwYaMwjVzwszIeAy17yanlRL0xUsMQD41ZBgPm/IX3evr0bd8h t52Sf3vBachUsH2aTamhLXAmPGIVVmxbsmm6eJm2OoDfb4u1z/Ab3fdh7EznyK7iKAahKesRs1Ztw 16OOfd2w==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oU1KH-008c53-Ly; Fri, 02 Sep 2022 07:42:55 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 9BFA230010B; Fri, 2 Sep 2022 09:42:51 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 793AE2B89F172; Fri, 2 Sep 2022 09:42:51 +0200 (CEST) Date: Fri, 2 Sep 2022 09:42:51 +0200 From: Peter Zijlstra To: Suren Baghdasaryan Cc: akpm@linux-foundation.org, michel@lespinasse.org, jglisse@google.com, mhocko@suse.com, vbabka@suse.cz, hannes@cmpxchg.org, mgorman@suse.de, dave@stgolabs.net, willy@infradead.org, liam.howlett@oracle.com, ldufour@linux.ibm.com, laurent.dufour@fr.ibm.com, paulmck@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, rientjes@google.com, axelrasmussen@google.com, joelaf@google.com, minchan@google.com, kernel-team@android.com, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH RESEND 00/28] per-VMA locks proposal Message-ID: References: <20220901173516.702122-1-surenb@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220901173516.702122-1-surenb@google.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 01, 2022 at 10:34:48AM -0700, Suren Baghdasaryan wrote: > This is a proof of concept for per-vma locks idea that was discussed > during SPF [1] discussion at LSF/MM this 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. The whole reason I started the SPF thing waay back when was because one of the primary reporters at the time had very large VMAs and a per-vma lock wouldn't actually help anything at all. IIRC it was either scientific code initializing a huge matrix or a database with a giant table; I'm sure the archives have better memory than me.