Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1259603rwl; Fri, 24 Mar 2023 08:13:40 -0700 (PDT) X-Google-Smtp-Source: AK7set+01780KPQ8VQWFUKxn4ooDLCe2HBagQKS9Sv6MqowVRFsdKoFXoBVc3o3Z0SuVyW4cFeRY X-Received: by 2002:a05:6a20:3ba7:b0:da:5772:5997 with SMTP id b39-20020a056a203ba700b000da57725997mr3562613pzh.36.1679670820449; Fri, 24 Mar 2023 08:13:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679670820; cv=none; d=google.com; s=arc-20160816; b=K/AD8+YmgH+Fm59/orEMz7WhVjnf2fBzibqtSr8Va74+QPCiLwr0YQl/CrL3Zt808x wsDIbq2gfd4K8689ijL/2Hq0XgUd3Bf2m0i40ucINwqbmFL6hNsr9GawnFAn9AeX7fZm rambVNqcJszGxTPRmnAB7tcop5J+rRxrmnKCnP6fgByyDlk6ftVIzLOIG0hWno6wbrzO vU3DEMrovpJKvC4exHaHGLO0iePMGC5n3h0j++Ke6uDInrwI7XFh0lem9wIRWHSJUpi0 X0j095u+bTQhJ7iSONALrm2JDriCaNTjA5LW9fUF6nqU6fnbl/NjiWbVXCE2/XoCHL3p Ln+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Rfr8g5aJSVUWobCiA6CGIV3Ux30dV0HPukLuzQZq+hk=; b=bYLnRBlTyTHzXLqbvfRlfQYP9HDWkXoNhqE/EqPhBAtKZIhnO6XuJji6Lu+khfJ88Y QfFJEaWFBDLbjKCUscLf8/Ac5yCVH4Z/W2u788XzCP6WiEEO1A9rzmnDk6gQu+J3xTXa CfkaBXnj+ZpfEjZIP9m5FniMxw4B6AXTpHCXKmhltxwkPJwrvJ8529C8kQhy6RpoImmS idn9tC/72CD9opV5LZoEIxN1dUK/q8/UUd25HLUPLAtHY37dGjLnfbuZ2H8GB3i/i+zo 8g/nl4+shDsX6gKvOIV94DY0KJDPAaooIJjsAiLfXZq3I43JomdVRijxBkiJiw97Td22 HbIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=UwCiahyM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a26-20020aa78e9a000000b0062b24b48726si1543505pfr.123.2023.03.24.08.13.25; Fri, 24 Mar 2023 08:13:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=UwCiahyM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232321AbjCXPD4 (ORCPT + 99 others); Fri, 24 Mar 2023 11:03:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230471AbjCXPDy (ORCPT ); Fri, 24 Mar 2023 11:03:54 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D883AE055; Fri, 24 Mar 2023 08:03:53 -0700 (PDT) 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-out2.suse.de (Postfix) with ESMTPS id 891C81FEF6; Fri, 24 Mar 2023 15:03:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1679670232; 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=Rfr8g5aJSVUWobCiA6CGIV3Ux30dV0HPukLuzQZq+hk=; b=UwCiahyMAVG4lGGaeiI26S5FSNGq7lKd3cTtrlRbhbaTyWMfUVFS0L7PWKD2QauBv0p/I8 lB/cCsq1Be+SXtxVBk7V/yeSH2c5VS/0qOq4zqdmw2BI187JynDfaVlhM67l2q+WGdYnHh tbQhI2CEZSj5XRY2mooGLZOyrHgWw5k= 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 55DCC138ED; Fri, 24 Mar 2023 15:03:52 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 838HFNi7HWS3XwAAMHmgww (envelope-from ); Fri, 24 Mar 2023 15:03:52 +0000 Date: Fri, 24 Mar 2023 16:03:50 +0100 From: Michal =?utf-8?Q?Koutn=C3=BD?= To: Florian Schmidt Cc: Johannes Weiner , Michal Hocko , Roman Gushchin , Shakeel Butt , Muchun Song , Andrew Morton , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [RFC] memcg v1: provide read access to memory.pressure_level Message-ID: <20230324150350.fu7itbqqvtjmyf3s@blackpad> References: <20230322142525.162469-1-flosch@nutanix.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="giw5phpov7yliruv" Content-Disposition: inline In-Reply-To: <20230322142525.162469-1-flosch@nutanix.com> X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --giw5phpov7yliruv Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello. On Wed, Mar 22, 2023 at 02:25:25PM +0000, Florian Schmidt wrote: > cgroups v1 has a unique way of setting up memory pressure notifications: =2E.. > There are several ways around this issue, but adding a dummy read > handler seems like the least invasive to me. I'd be interested to hear: > (a) do you think there is a less invasive way? Alternatively, we could > add a flag in cftype in include/linux/cgroup-defs.h, but that seems > more invasive for what is a legacy interface. You can (as privileged user) modify file perms in userspace first (e.g. chmod o+r memory.pressure_level) and then it can used by non-privileged users. (Or do LSM prevent you from that too?) > (b) would you be interested to take this patch, or is it too niche a fix > for a legacy subsystem? I'd rather not extend this "unique way" with additionally unique dummy helpers. My 0.02 =E2=82=AC, Michal --giw5phpov7yliruv Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQTrXXag4J0QvXXBmkMkDQmsBEOquQUCZB271AAKCRAkDQmsBEOq uaftAP9jAb8MRvyOlJlzSiA/74Dm588NNIhwB30zeAvi2Gy2DQD8Du97muUPss8S XDdnabKXH1krN1zbPtFwqMvvCx5e6wI= =7Q79 -----END PGP SIGNATURE----- --giw5phpov7yliruv--