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 64360C77B7E for ; Tue, 2 May 2023 17:28:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EC3E46B0071; Tue, 2 May 2023 13:28:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E745E6B0072; Tue, 2 May 2023 13:28:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D64BE6B0074; Tue, 2 May 2023 13:28:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from mail-yb1-f174.google.com (mail-yb1-f174.google.com [209.85.219.174]) by kanga.kvack.org (Postfix) with ESMTP id B68F86B0071 for ; Tue, 2 May 2023 13:28:43 -0400 (EDT) Received: by mail-yb1-f174.google.com with SMTP id 3f1490d57ef6-b9d8730fe5aso6091630276.1 for ; Tue, 02 May 2023 10:28:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1683048523; x=1685640523; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Kqzz+/GxncWIao9Bock5vwwaZbkqqeGi4SiiZlGw4u0=; b=uk5HHqrF+3xUFhy6LGfdRt3HWRbHBpYFpPilBiiA6uhDESt/dztgdL+iVfum5GV5Su 14Yx0eRcvuTMtT43xEy0DA/tAwpgy/J1QbiP4UaHKrGpnnCNEgi/7TWQxLQApTNsTd16 YZBZlhmXiWGuTNoXeBL52n4/ASZT+G5osIUz29dnI0roDnThHAIj/Q5oO0VAru1zeaGP vfuLP7VoFoQGs6GYPGsSRp/L64sBlV6S0qHo1z5xVFiQcAT1GLwzJ8vVVbMIh2H4zLyY JniQhfTu4iu5aYxMHjurDSGbPfXE80hefAljZgoaO1fAS5NlG4YI6EqvyJl3tPLi8mzd 6XWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683048523; x=1685640523; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Kqzz+/GxncWIao9Bock5vwwaZbkqqeGi4SiiZlGw4u0=; b=JSYQKxIWrQ2+ihoUUYzY2DCGyYT5zxxBM+8+zBC20MxKbJ85E229dz5XN+/7zad+Yi AJR27O1uYKowMLbraielRcfr+sNL36inZGQg3MEAEbYJJrw5NtSbFasROBXWtJjR7iF9 adNbqjiWQxtAcMmNLuUvu0Qag7d1mSSubvvvIsn8ijrVdBnTq10yzsReuWwVMB6ogHRV SohY/zCVIwPMfZoFx0MT3/By8OMb3oCHVgA29r9zQpsqQWUYn4OVbryFHBAFlZjIzDF+ 9mMq6NSvLsZ7HefPz5LY/aOKne5vW+ttVdIFVuT0LMVG7zOdYynfgaxmpObQjkHjfNZT Wpsg== X-Gm-Message-State: AC+VfDxfMI+NNon1SmaktwGYMSrFkZqva23uSJGobjUpALNKNyQaKZ6P eKh8tb8gRSQZ/QgGmlvZCCI4f6/E54F/5KAQbYO+zA== X-Google-Smtp-Source: ACHHUZ48aqhkA7yp8BublhhXvo++PeeFv3AjVerN6+MzQrUQkQ/KZrYSuc2yp69yL6GdfcwE1ICQ/9YD4wngQl1dQuE= X-Received: by 2002:a05:6902:1148:b0:b97:f46:a2b8 with SMTP id p8-20020a056902114800b00b970f46a2b8mr22686282ybu.17.1683048523065; Tue, 02 May 2023 10:28:43 -0700 (PDT) MIME-Version: 1.0 References: <20230303011346.3342233-1-surenb@google.com> <20230502172404.GI1597538@hirez.programming.kicks-ass.net> In-Reply-To: <20230502172404.GI1597538@hirez.programming.kicks-ass.net> From: Suren Baghdasaryan Date: Tue, 2 May 2023 10:28:32 -0700 Message-ID: Subject: Re: [PATCH v2 1/1] psi: remove 500ms min window size limitation for triggers To: Peter Zijlstra 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 2, 2023 at 10:24=E2=80=AFAM Peter Zijlstra wrote: > > On Tue, May 02, 2023 at 10:20:34AM -0700, Suren Baghdasaryan wrote: > > On Thu, Mar 2, 2023 at 5:16=E2=80=AFPM Suren Baghdasaryan wrote: > > > > > > On Thu, Mar 2, 2023 at 5:13=E2=80=AFPM Suren Baghdasaryan wrote: > > > > > > > > Current 500ms min window size for psi triggers limits polling inter= val > > > > to 50ms to prevent polling threads from using too much cpu bandwidt= h 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 laten= cy 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/* fil= es can > > > > be written only by processes with CAP_SYS_RESOURCE capability). Thi= s 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_sudaraj= a@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? Yes, I'll be merging it into Android branches counting on it making upstream later on :) Greg will hate me for that but I'll survive. Thanks!