Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp612366rdb; Wed, 17 Jan 2024 11:40:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IEV1e3qV18Pr3cmtQkuPIxmnA/rNXis/t8P64ETE1rqYdT4uih+OKRgxmVe+zRTq+5Pq5ZY X-Received: by 2002:a17:90a:68ca:b0:28e:7e95:b8fa with SMTP id q10-20020a17090a68ca00b0028e7e95b8famr2296880pjj.97.1705520419793; Wed, 17 Jan 2024 11:40:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705520419; cv=pass; d=google.com; s=arc-20160816; b=kYp2El3s5YoNZK0vhBdi8c6yAHhkA5JScwbtWHmgDYNjVho2sRc/t5QWVgtTNeAKLE bIDwq+TUtega+Qs9nZYdYgW7X5DbnEKVmYtdHn4O0m0IfV24T1W5zgCoEwPmz9Vy1lUN 1gYitqmWR6sefyx6JCD5+bT5UUC2110uMZtuwUXw6cHTNtxHjmCvBVw3mXdg/rrireI+ OoSvvQoCShh3nbg7vdQJPpUWaUkKXy98gcsr22MNscfCIOvlpFEL2SY67eLBkZlOxzlx jpjrAe+QuRVbWSFkx1g9OmCgQ6KAkeKtkH08gJ2JqWuh84mBQ+Dz84IkRl1UjreU0Maf A0Cw== 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=m+NXdSEy24MzzjJbAjnoAHvAlL54I+uQnSKJdE/tLFE=; fh=8dDizOAiYLPJ8z2zPyCvYAIV9wnOFN3y2bSLUp/rplk=; b=Vwb2CxQOpVJB9zKpxY7QHiRDIEdw200KMmJayAS9nHsdTAXurzIkBW35/ZjHlUtqVT xba2RIlbxblY1A8HjVD/q+Rddh80Z+xZc6qobdKwB9ilL2An0+3MQNMUfmIF6bv8Q0fs nh76W0C7R1yQdb1Iqrcjzy6ISZcdLX0w9SmDgjroEEdnwUmVwyfYs78zEGs1A7B6YpYj i667nGoQL7eBlTb1LztQ4uwU+1mfA0fnp3gP4pitdlGooJRh/8fSFbEV+DX0R23wmOWv sNPxkD/6lDSWJx6POMusnGH/uvltocjr/ewChQzFkrFJ+uRPIr+mOPhLK9cjaRbbURlY wtOg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=orRxnePz; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-29370-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29370-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id qa5-20020a17090b4fc500b0028ff49fbe70si79980pjb.61.2024.01.17.11.40.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 11:40:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-29370-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=orRxnePz; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-29370-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29370-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 6016EB23D2C for ; Wed, 17 Jan 2024 19:39:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D7824249FF; Wed, 17 Jan 2024 19:39:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="orRxnePz" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 064D1249EE; Wed, 17 Jan 2024 19:39:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705520358; cv=none; b=pd2vhZP8rxuGdA+C2mFoTJZhgr6V2xEE26+FCAtnIuJyadOppmR82rj8ECoNsr3A08jRdxPd1EMaeW2TrFKDooOZPDqnsGpsO7gsznYDuUNaWmyLlFme1cubixKjvIF2rf94L0pE9tWEW24OwZEWVT4WcIYFRA0qJ3syVogczPM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705520358; c=relaxed/simple; bh=qqBJ5vug6dV0ozKgqcaIGBYDgv7KtCxfYMh7ZJ6Q26I=; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; b=d9O6aY98py+MFcMJvI96EppTKw8a/g8wsnjmCnkMLj3VJ6vbxDZ4PJlfCNBIlHgtyfZCGSnpaNdXeKcDXmAn1QZHUe/MzeZRUUq4YA4mRlC+cPaDvVTyTcgzOicxeSj3pM13SnpsR4+nnUaNrDiS1ZPqhRaY5OnDUnmnAKTaS+4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=orRxnePz; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E773BC43394; Wed, 17 Jan 2024 19:39:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705520357; bh=qqBJ5vug6dV0ozKgqcaIGBYDgv7KtCxfYMh7ZJ6Q26I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=orRxnePz8lKyXr+Shhml4pKgH35Jq98oR0yKMRCVSvRdPt89dqd8YD1EAaHH1FYAo b1YS475T+RiWVkm65+l4ip+ukCfn8tdioNl9nx7fpInQeLqC9Nrzwn/lM2rZy8WKPj nq8961EIaresqnhqe0wVGapP70T1nfuuMAZIjubxrsRn/dKoqMlDmIr0LdZh6q8lIK 8w7wMv9952y1yVGe8dIIeBKka/8Yag8C+MpbiU/3ksYdDz2CYgVJ0/eBB9qT4Y/DYl Y2q71urfRZ3QKbHNM/0VzD/dSKy1cYDJv7gqZzC16eNsvtbxduiSLAEEbcEhbHg7A5 hBWLDtV0WGlzQ== Date: Wed, 17 Jan 2024 11:39:15 -0800 From: Josh Poimboeuf To: Jeff Layton Cc: Linus Torvalds , Chuck Lever , Shakeel Butt , Roman Gushchin , Johannes Weiner , Michal Hocko , linux-kernel@vger.kernel.org, Jens Axboe , Tejun Heo , Vasily Averin , Michal Koutny , Waiman Long , Muchun Song , Jiri Kosina , cgroups@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH RFC 1/4] fs/locks: Fix file lock cache accounting, again Message-ID: <20240117193915.urwueineol7p4hg7@treble> References: <6667b799702e1815bd4e4f7744eddbc0bd042bb7.camel@kernel.org> 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=utf-8 Content-Disposition: inline In-Reply-To: <6667b799702e1815bd4e4f7744eddbc0bd042bb7.camel@kernel.org> On Wed, Jan 17, 2024 at 02:00:55PM -0500, Jeff Layton wrote: > I'm really not a fan of tunables or different kconfig options, > especially for something niche like this. > > I also question whether this accounting will show up under any real- > world workloads, and whether it was just wrong to revert those patches > back in 2021. > > File locking is an activity where we inherently expect to block. Ideally > we don't if the lock is uncontended of course, but it's always a > possibility. > > The benchmark that prompted the regression basically just tries to > create and release a bunch of file locks as quickly as possible. > Legitimate applications that do a lot of very rapid locking like this > benchmark are basically non-existent. Usually the pattern is: > > acquire lock > do some (relatively slow) I/O > release lock > > In that sort of scenario, is this memcg accounting more than just line > noise? I wonder whether we should just bite the bullet and see whether > there are any real workloads that suffer due to SLAB_ACCOUNT being > enabled on these caches? That's a good point. If the microbenchmark isn't likely to be even remotely realistic, maybe we should just revert the revert until if/when somebody shows a real world impact. Linus, any objections to that? -- Josh