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 A1173C77B73 for ; Tue, 2 May 2023 17:24:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4188D6B0072; Tue, 2 May 2023 13:24:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3A05F6B0074; Tue, 2 May 2023 13:24:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 268C86B0075; Tue, 2 May 2023 13:24:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by kanga.kvack.org (Postfix) with ESMTP id F0C906B0072 for ; Tue, 2 May 2023 13:24:38 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=hrcCJlzTEWTjYDj+PsLFsdbovv7vXKPWKk6sNRy/lTs=; b=qHun9WZXPvt4wdHJ6P0pkB1o/5 E/ri8TDaZGkBh0zusE18HSRSMDEwT0FEz+LpLM3rUN86dbm7KPkxy6/RUQ8Ur4lh2mA5I2yp9Y+rO VJiZz9HytEWqnZ79cpEpij8B4bbKSaN/Bn5y+u0/bd/1ub9wKIX7Dfh8KwfjVEwUbCyEKF9hfmndm Pd1iqy5s+flkn2iVMeoxFgK9yUU04jnWWkGf2RvPZxQj/y2lSvPl22O6ivV7EPRDECuU+NayXGWk5 GTflEOThiCrz1ZEVg/psUxh0iZsOJ1VEgQHS8Ba0GD7LzEGquQggZsjJTdOrT+TLKeDxm8mRn0XqB B5dR7HxA==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1pttjS-008YZ8-Ta; Tue, 02 May 2023 17:24:07 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 72CC9300165; Tue, 2 May 2023 19:24:05 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 1FBF72122BC96; Tue, 2 May 2023 19:24:04 +0200 (CEST) Date: Tue, 2 May 2023 19:24:04 +0200 From: Peter Zijlstra To: Suren Baghdasaryan Cc: tj@kernel.org, hannes@cmpxchg.org, lizefan.x@bytedance.com, johunt@akamai.com, mhocko@suse.com, keescook@chromium.org, quic_sudaraja@quicinc.com, cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/1] psi: remove 500ms min window size limitation for triggers Message-ID: <20230502172404.GI1597538@hirez.programming.kicks-ass.net> References: <20230303011346.3342233-1-surenb@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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, May 02, 2023 at 10:20:34AM -0700, Suren Baghdasaryan wrote: > On Thu, Mar 2, 2023 at 5:16 PM Suren Baghdasaryan wrote: > > > > On Thu, Mar 2, 2023 at 5:13 PM Suren Baghdasaryan wrote: > > > > > > Current 500ms min window size for psi triggers limits polling interval > > > to 50ms to prevent polling threads from using too much cpu bandwidth by > > > polling too frequently. However the number of cgroups with triggers is > > > unlimited, so this protection can be defeated by creating multiple > > > cgroups with psi triggers (triggers in each cgroup are served by a single > > > "psimon" kernel thread). > > > Instead of limiting min polling period, which also limits the latency of > > > psi events, it's better to limit psi trigger creation to authorized users > > > only, like we do for system-wide psi triggers (/proc/pressure/* files can > > > be written only by processes with CAP_SYS_RESOURCE capability). This also > > > makes access rules for cgroup psi files consistent with system-wide ones. > > > Add a CAP_SYS_RESOURCE capability check for cgroup psi file writers and > > > remove the psi window min size limitation. > > > > > > Suggested-by: Sudarshan Rajagopalan > > > Link: https://lore.kernel.org/all/cover.1676067791.git.quic_sudaraja@quicinc.com/ > > > Signed-off-by: Suren Baghdasaryan > > > Acked-by: Michal Hocko > > > Acked-by: Johannes Weiner > > > > Forgot to change the --to field from Tejun to PeterZ. > > Peter, just to clarify, this change is targeted for inclusion in your tree. > > I think this patch slipped through the cracks. Peter, could you please > take it into your tree? Sorry, yes, got lost. I'll go queue it for post -rc1. No urgency with this right?