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 CB9D5C5479D for ; Wed, 11 Jan 2023 08:23:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 29BE68E0002; Wed, 11 Jan 2023 03:23:24 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 24B5A8E0001; Wed, 11 Jan 2023 03:23:24 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 113A48E0002; Wed, 11 Jan 2023 03:23:24 -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 F2A538E0001 for ; Wed, 11 Jan 2023 03:23:23 -0500 (EST) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id BBBEAA0664 for ; Wed, 11 Jan 2023 08:23:23 +0000 (UTC) X-FDA: 80341828686.12.071F0B7 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf16.hostedemail.com (Postfix) with ESMTP id ED23918000F for ; Wed, 11 Jan 2023 08:23:21 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=Y1DVgH1V; spf=pass (imf16.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1673425402; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=EfwiP2dC1eDqP+D8JpK5Kyw3QfggSfn8KfyWpOLYNw8=; b=rP+QxrvLEPVVn86v/aKy4iAmYYGbezC8teo88if2w6FCdZ4DzxiNbn6ITm+dzEhVJKEO1+ depELyg2GOezjYNE8oB5mWUaW9VUtM+fJ0X02CSzTINUclHj+dspZDnRedMMudgpb2K4Rm t3dJU76L0aLqwsnk5e2aUAoKQlP+Gto= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=Y1DVgH1V; spf=pass (imf16.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1673425402; a=rsa-sha256; cv=none; b=38VOy4qfe9qC/pvwurJpjDog3ntK72XHOsjftKIWw4WadDD5iCnYFjA8y6xrcQRTclyD4b FeGOpy3LapDF4vTithTQ2K7KjQQeReu6rIKOgzPLVqhxUBwiSOM5/ABN1VSResJf0Fu2lV i95Y/HO3pcOIj/XviVisX/SoN3SV64c= 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-Stat-Signature: ms8pmri3iyhkb5nfsbgua3yheodno3e6 X-Rspam-User: X-Rspamd-Queue-Id: ED23918000F X-Rspamd-Server: rspam06 X-HE-Tag: 1673425401-869646 X-HE-Meta: U2FsdGVkX199QC/wYon7lVHm111kHBcKFaB46CaKHW7hd9zFzukdLBOJ46F5dlgRW/BNPzgHGFp7GCMYWjCufHi7UQFEc81zC0UAyoThZdlTcfEDGa1NO08JUTWvij+9zfVJr48nqwm2/RBlEWnwLCvWbG0SHEXR3hv/K8F3+1KxC+m9/eZetJeEYXrXJR79w5w15hkX8a5wC2J6C5r57RpyTkCqTUnxZRD/rZtC2jxV26ACUxAKfstb68zLammyESg+U33OnKrBTMroH2/KjoK400C2BtdSLpBMGquKPFzOZZIZjnmIFShr88la+UfqOtDCZ2Y6ITrRFOtDWkNWWaEM9E9WEmbGVqBUGypv3LF7w5aXd8blJZ14ZWlvcGzBqKK/RtbgevVVsNXLnHUgxjw/eSMPAS2W1rZt+XIoyRwpr5K+om0ni7FZ4F4RO0UiSO3+Ls0YHj9QVn53qCwKU6yKIMOuEIMl39+GQNPcJ8cCxd8w7lT4pc7tj5yURt6lwpAhp2Wo5IH4nq6FrinanUr1t1UjRF/snyTiwHoqGR7+CeRRp5v+ayyUnz818AmrG0ACBi18HG44atL5YdnbXZhISFAgm842X8nJiM6aENihdVsnhW1qzYgIGyne8mDpW7WUDY0T1n/oOclxqYYc/IMQ9xVeKtG8lywxY2uzyQpYUuxqiGy7D37aME5FuLJbEFVw76I+Lfu+2z2cJwAYM0gYZt6GESZSNlptnbcJsjkZ/HnL+Xnp4iGhnuVihoDDH29PPVMwUKWvIuB1ITyTVoJtDydQKlLRBJEfvi7uuXwyDgowiruTclXfJEyos/WjXtelqn4X+WOJDZFAvAwIqsx5Ug5V0u5b+zJVqIvnwB17aou1jo3hVbiRzX5JKxZ0cU2N7kyxPtn1oLqSqz7RQp9PDvWP2D+S 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 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