Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp9063141rwl; Wed, 11 Jan 2023 00:36:37 -0800 (PST) X-Google-Smtp-Source: AMrXdXtjXCnEQN+HYJh9KL2e3k0M2ozwxwVpCS947Ohu6MYkQA6G2wxJrV1920bGapekKK6ywd2A X-Received: by 2002:a17:902:f152:b0:193:2135:7fc3 with SMTP id d18-20020a170902f15200b0019321357fc3mr1719742plb.7.1673426197022; Wed, 11 Jan 2023 00:36:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673426197; cv=none; d=google.com; s=arc-20160816; b=inGHKPiMD22LzCEZ+xJmIPdufuajXNtw42uLMEnrCPBNH3NgQ19hmVAT5frP32WS+4 39onDOuAy0PUVJMxde7nEtMTsUlRZDM7UOM8XKXStMpbSXg/erEJ5auiBMbP7gTqbbl/ X3yLCUH/VkgiKYtxOSf6mPLmoAkTJ3f2phB0v7147zfKa8ABatBKIwNEeIchnJ2ydus2 QIBGv+2n9j1m3XEEy5/XQKIUxmPwkrhwFXl6zAbjY888m0frzU4ZcT2H57PVVw14ic9T nY4AWascUbbrHCMqn/PWipBpNx1w9f0lM2uX3K2/YZYJpdwDzp5dfzzK7k6oLFHdzP33 VPzQ== 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=EfwiP2dC1eDqP+D8JpK5Kyw3QfggSfn8KfyWpOLYNw8=; b=LZV11zNOg/hb1lTt3+8/Z/DC5TO0dpZrCI0UO6QVdkj1vhns1sgvgWh34woT7+6mxU 8Deg0MOK6tUUBotR6yHwwbZgrLhx17wxH2n9l04fICg+zbdE41d99HISERhoynJVtFOv /pblkodtiJWdAIeN48LqFRWW+PLFOk/araVq2pelcJiBwlWYgkhqQ+37wG/hcwwGg5RQ DGHS8XF24U6DxjKY/9knGY8u5d3ft0TXmfwVYvP2knJRbqm69ATrZdKMMan1frbRvd06 ve4h8Ekp9X5Q0p8y11167on/ASLiR1QmiClrQEXubHm1Uy19AZsGJQffY4IzM32pn0Jf tPIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=Y1DVgH1V; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d6-20020a170902cec600b00192c4055e78si4892444plg.544.2023.01.11.00.36.30; Wed, 11 Jan 2023 00:36:37 -0800 (PST) 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=@suse.com header.s=susede1 header.b=Y1DVgH1V; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235752AbjAKIYG (ORCPT + 55 others); Wed, 11 Jan 2023 03:24:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232053AbjAKIXY (ORCPT ); Wed, 11 Jan 2023 03:23:24 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D96962738 for ; Wed, 11 Jan 2023 00:23:22 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 497FA16EFE; Wed, 11 Jan 2023 08:23:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1673425382; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=EfwiP2dC1eDqP+D8JpK5Kyw3QfggSfn8KfyWpOLYNw8=; b=Y1DVgH1VkYVUd/qgGeY7SSd5DUn1ebzNMhQ32O2WBJ0H2JlsmHRmT+tBkerjErOyobL92s 6Ii1Lh3Zi0B/UVP0axrNxOmSNPAcLOSv4PIWvBT/PZkNQTPGs8ATon8ga5K3HkK3ZdTfpE iqPWwga9fQWZnl5Cofn+JACQBZ2dDWE= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 1E85613591; Wed, 11 Jan 2023 08:23:02 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id ZcAEB+ZxvmMSQgAAMHmgww (envelope-from ); Wed, 11 Jan 2023 08:23:02 +0000 Date: Wed, 11 Jan 2023 09:23:01 +0100 From: Michal Hocko To: Suren Baghdasaryan Cc: akpm@linux-foundation.org, michel@lespinasse.org, jglisse@google.com, vbabka@suse.cz, hannes@cmpxchg.org, mgorman@techsingularity.net, willy@infradead.org, liam.howlett@oracle.com, peterz@infradead.org, 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, punit.agrawal@bytedance.com, lstoakes@gmail.com, peterjung1337@gmail.com, rientjes@google.com, axelrasmussen@google.com, joelaf@google.com, minchan@google.com, jannh@google.com, shakeelb@google.com, tatashin@google.com, edumazet@google.com, gthelen@google.com, gurua@google.com, arjunroy@google.com, soheil@google.com, hughlynch@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 08/41] mm: introduce CONFIG_PER_VMA_LOCK Message-ID: References: <20230109205336.3665937-1-surenb@google.com> <20230109205336.3665937-9-surenb@google.com> <20230111001331.cxdeh52vvta6ok2p@offworld> 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_PASS 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 Tue 10-01-23 16:44:42, Suren Baghdasaryan wrote: > On Tue, Jan 10, 2023 at 4:39 PM Davidlohr Bueso wrote: > > > > On Mon, 09 Jan 2023, Suren Baghdasaryan wrote: > > > > >This configuration variable will be used to build the support for VMA > > >locking during page fault handling. > > > > > >This is enabled by default on supported architectures with SMP and MMU > > >set. > > > > > >The architecture support is needed since the page fault handler is called > > >from the architecture's page faulting code which needs modifications to > > >handle faults under VMA lock. > > > > I don't think that per-vma locking should be something that is user-configurable. > > It should just be depdendant on the arch. So maybe just remove CONFIG_PER_VMA_LOCK? > > Thanks for the suggestion! I would be happy to make that change if > there are no objections. I think the only pushback might have been the > vma size increase but with the latest optimization in the last patch > maybe that's less of an issue? Has vma size ever been a real problem? Sure there might be a lot of those but your patch increases it by rwsem (without the last patch) which is something like 40B on top of 136B vma so we are talking about 400B in total which even with wild mapcount limits shouldn't really be prohibitive. With a default map count limit we are talking about 2M increase at most (per address space). Or are you aware of any specific usecases where vma size is a real problem? -- Michal Hocko SUSE Labs