Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp170902lqg; Wed, 10 Apr 2024 21:14:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWfZGSUfHq9iz+EO5EVHHbTWhCHOvt2r60+xS8ud06psiZgd8khiJ1Fq2/EbVpoaecBs0d94dBjyGgVULofJ1fnOVh8J/nu8zXH2uc+Ng== X-Google-Smtp-Source: AGHT+IHeOyy1Nv7WJ9WncyrwGX1+NlNBd4R/0bYLhYfvKkSyxOWVqUZLRpLoBZqGPuURAhJFpOKX X-Received: by 2002:a05:6870:b506:b0:233:60e7:52bf with SMTP id v6-20020a056870b50600b0023360e752bfmr834554oap.50.1712808863327; Wed, 10 Apr 2024 21:14:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712808863; cv=pass; d=google.com; s=arc-20160816; b=Y/j6tCU81O8MwaAeR0WdobLJ3RS3OA5fFptngKhLRPtfHnm+M0PoQuXNnKT0fiLnQF Pf66xrV3hL0feZxLD+n2zwmI05Dl6jFHydfdXGG9AM2yTqxOdapD+UoFWac2/iFZ6iZB VKn1aaeO05vfZYA4IvOTP8QvShUz4YYipSanxnTYAZRkXj9CWAppZwxO7aDvL3e5hecg bmToeZb9gPwNKniY/lF0gW7WRL9xJwqYKSedndxi2J3CzjoaR/5CjCtWa/mZ55feY/u3 UEkG0ToEbwmMhGySKhFpmyeGl3NsnSKMkrpPHR6stksmiCc7hjz2IhGJ6sFomGA3fmf0 GeBw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Oh9geONnOFhFyrtxPHhIzWGAqO2nRJc8KgJoEh6Vr7s=; fh=iDS4lD3IEG4YyVDLvWKE+En6fruH3ys1P7G/+ADi9hA=; b=gXKBG4JmxYG0RNyTLtlbCa8Fn1jH3t2I0hoRBR0pwtOjI3Gv6klUutz3msdBuTQ8VT vL/4bShZiYCrzqMu/5r5W1qqZ2xBUmdKGKevwaIxlpbvGBdo700wfoLrAg/s9uxwncqB 8HoW7zrkOV3opJfjRN+lq/UntuVivihsslDlTBkemp2rL5fDNVenC8Sir3YCsNkGsaNo vBko5i3PClZe7EKucFIqZ1LljFQSEpX78N2slBcpS16JQSMGABnhrWAbwN6Qgmw4X30H KI341HVr8jaJ/wfjDWmKRu2Z6OHyE2bVm1xeA4v87hyFicBsiMxagRvPaE5pNuhrxubg zNyg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=AJFmOhDy; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-139553-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139553-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id s8-20020a056a00178800b006e629ca2803si679867pfg.180.2024.04.10.21.14.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 21:14:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-139553-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=AJFmOhDy; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-139553-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139553-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id F3A1D283BE9 for ; Wed, 10 Apr 2024 23:59:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 866353FB88; Wed, 10 Apr 2024 23:59:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="AJFmOhDy" Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 25F4FEAE5 for ; Wed, 10 Apr 2024 23:59:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712793563; cv=none; b=m4u5nkiIMZT0qbh+BnyaV2W/QyKC1JLbLT11/Q8L3BjfA0DXZb9LBqwU8cJKKrXuc4O5csJXm/vU4KZtnWsT3cwgzUkJ8TmXd9GHdTgbsE3zDxrzWZkwGsVDg9XR4e/NaMF15n6Zvhm3RkmATRFwlA5V9pNEYAyfo56sVWwGWIk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712793563; c=relaxed/simple; bh=oEZirylTvXWz1CmEJ8DBxu0TbNj1+ae9oUvgLTlYpJ8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=IAiUCwiQ4+WPBsWWiOGUpu0/FNjFJKsOEkMnnjCX94uADOr4l+stq1kzLjaye2bnfeuWQTPScAcrvt293r+Nlborqm/FsCTmIguxqjhTj1fgT1vsOxLKQBBjGbwEL20aCa84N5632YjkF+hhHBD8K90y6UlRaTozoBIok0YnZVU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=AJFmOhDy; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org 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=Oh9geONnOFhFyrtxPHhIzWGAqO2nRJc8KgJoEh6Vr7s=; b=AJFmOhDy4PdkswkZTKs462wEa1 Lu/ukDoNsEN6T3i0HFlxvk+AyFJ3r3n1a64GSJMrzX0Mzezv8ckgCw/vUSh3V/p3SYDn2c0WQKT/0 Db/z0S7hN/t8uycwVygZhkj/LB/X5iWRhOfI8B4JjTayb6rG1cAUH+atl89UphV+zjfJXfrA65xlW +78Ih01QSBDUCn43vyJz7CANzkdsyYINaiiPMmCEP5s8LKmCEdCeoWN54vmb7OZBQM2D0dVKeLmGR nO0v++oO/wBcNZIFaBGPke6ujFNnuhZwUqCdmJWs1YP9KPljmKUJlJAid//kcZa9/T+h6wx7Mg9r5 m7HRuUfQ==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1ruhqP-00000005a1j-23rB; Wed, 10 Apr 2024 23:59:09 +0000 Date: Thu, 11 Apr 2024 00:59:09 +0100 From: Matthew Wilcox To: Peter Xu Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , Suren Baghdasaryan , Lokesh Gidra , "Liam R . Howlett" , Alistair Popple Subject: Re: [PATCH] mm: Always sanity check anon_vma first for per-vma locks Message-ID: References: <20240410170621.2011171-1-peterx@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Apr 10, 2024 at 05:23:18PM -0400, Peter Xu wrote: > On Wed, Apr 10, 2024 at 10:10:45PM +0100, Matthew Wilcox wrote: > > > I can do some tests later today or tomorrow. Any suggestion you have on > > > amplifying such effect that you have concern with? > > > > 8 socket NUMA system, 800MB text segment, 10,000 threads. No, I'm not > > joking, that's a real customer workload. > > Well, I believe you, but even with this, that's a total of 800MB memory on > a giant moster system... probably just to fault in once. > > And even before we talk about that into details.. we're talking about such > giant program running acorss hundreds of cores with hundreds of MB text, > then... hasn't the program developer already considered mlockall() at the > entry of the program? Wouldn't that greatly beneficial already with > whatever granule of locks that a future fault would take? I don't care what your theory is, or even what your benchmarking shows. I had basically the inverse of this patch, and my customer's workload showed significant improvement as a result. Data talks, bullshit walks. Your patch is NAKed and will remain NAKed.