Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp29600344rwd; Wed, 5 Jul 2023 14:33:06 -0700 (PDT) X-Google-Smtp-Source: APBJJlGDRR9O/ZUcbZSbP75s+Wt47CycNVTB7NtI7vzfdHGi0FtdHHnP77SFplI7cIEk/y5HuXWv X-Received: by 2002:a05:6870:40c2:b0:1b0:58e9:6521 with SMTP id l2-20020a05687040c200b001b058e96521mr205400oal.46.1688592785705; Wed, 05 Jul 2023 14:33:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688592785; cv=none; d=google.com; s=arc-20160816; b=HF7Lp/jTPNTTD/X9uRy3ctEQYgqMuKkqC8LvsLOpKCEaRIV/5z1Rg+PTbVveIdifSq k3IJkENm6pl2wf2XFUpxlKcLJDJAxnuu51lR9U8N7VzQrePXjPbIs3cwaRpFeto6rxl5 RKylc9t+nXdfbH22e1AaQ/K27Kz2062SSfiNVcJVj5P8LTFtKDTdpdvQPnPK1OYEqvwt jw2uhz8crhOfZkXckxY4vVzOxVGvWZWL8X/gtsi/iZ9bSdegF7S04zXbA9kFL+Cxsk7p x+FpoE4LIiWP7IGnEsKPokyww0r538fWhJ8mWpJXyKYWsZc83TbS7N/VoRg+TOJvOZUB gPVg== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=cgSmgMJRLpJHBRFXoz8XxIGxxvj9mwwGxUoWKCRz164=; fh=kWy8Rdp/nbL908E/YIAx02d1n3YGkflsrxhXpQbwj9M=; b=NiWhJSCevQKA6MXsRocESZ6nSVMHfllGvjsWpljqM+HmJy/0beqlUTZ2/UilXtlv4O nRQu5LAZb71QCzjQDZFAt7HUrbF14KGW0iW44f5DidDQEtizBwUv+X3EWSPXBeAbSqD1 fbxfgnVfAgU6kuhjnyp533iae3ExI6pMaU8yHTkyJ5Vh7f0le0u9gPc6SWb6SfTkyh6j 5BWf3E5BLS3B1iW02Y2vJex3bN1SUVaKOqDqLQVVKzj7W7i7vG7HYUpmiwpvWyjo1jAI TzSovmZ+SU09viH+D73mJE7EhrzPB/cnGwxPn68mElCQUFmf6lz8Jge/bGu0e/2+0VyV xAHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=JQSE5WDO; 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 b4-20020a17090a6ac400b0025e2c7b1808si153087pjm.53.2023.07.05.14.32.50; Wed, 05 Jul 2023 14:33:05 -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=casper.20170209 header.b=JQSE5WDO; 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 S232182AbjGEV3R (ORCPT + 99 others); Wed, 5 Jul 2023 17:29:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232173AbjGEV3N (ORCPT ); Wed, 5 Jul 2023 17:29:13 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4710519B2; Wed, 5 Jul 2023 14:29:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=cgSmgMJRLpJHBRFXoz8XxIGxxvj9mwwGxUoWKCRz164=; b=JQSE5WDOUg+gd658BVvKQIfUJx 7+D9YjlvW/5ZdTkkdlgIZC9IGZPyKyRHXjjOb8q/jh5PmElpP+i3F9XT41LmI11uzY1s8TvsrVSrm z3uM3r5sbTJ4cM5ZRnNkkZGx6v0W/gRkeUqED2U7YOs9tImfsNX54mawLDAXpsjDTSzXdKv8Z/x7m 2xLdDpqpRys0F5YliCsoIA51JpPo1NBbtwuHvv+Y7tGGarmBBGMA1XN+U3b/kWOZLCdLZrgHoBr2F JHYxA6l//VaGn4uU7dk2N2KmByd3hmLW/vFq2OqrXzxTyJpGMFQAiqi4pL5gDbK074CzFLXzMgcFu 0v6eLb1g==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qHA2W-00ARLH-7a; Wed, 05 Jul 2023 21:27:56 +0000 Date: Wed, 5 Jul 2023 22:27:56 +0100 From: Matthew Wilcox To: Peter Xu Cc: Suren Baghdasaryan , David Hildenbrand , akpm@linux-foundation.org, jirislaby@kernel.org, jacobly.alt@gmail.com, holger@applied-asynchrony.com, hdegoede@redhat.com, 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, 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, chriscli@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, linux-mm@kvack.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v3 2/2] mm: disable CONFIG_PER_VMA_LOCK until its fixed Message-ID: References: <20230705171213.2843068-1-surenb@google.com> <20230705171213.2843068-3-surenb@google.com> <3cdaa7d4-1293-3806-05ce-6b7fc4382458@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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,URIBL_BLOCKED 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 Wed, Jul 05, 2023 at 04:25:21PM -0400, Peter Xu wrote: > There'll still try to be a final fix, am I right? As IIRC allowing page > faults during fork() is one of the major goals of vma lock. Good grief, no. Why would we want to optimise something that happens so rarely? The goal is, as usual, more performance. Satisfying page faults while mmap()/munmap()/mprotect() are happening is worthwhile. Those happen a lot more than fork(). In this case though, there's also a priority-inversion problem that we're trying to solve where process A (high priority) calls mmap() while process B (low priority) is reading /proc/$pid/smaps and now (because rwsems are fair), none of process A's other threads can satisy any page faults until process B is scheduled. Where on earth did you get the idea that we cared even a little bit about the performance of page fault during fork()?