Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp1011784rdb; Wed, 1 Nov 2023 08:57:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEHHu/sINZoBBcLAcJosh3A93OzYwFyZuxEqozWV4oneUATsOzHIH4DpO+ejD8AJBz78JtJ X-Received: by 2002:a05:6a20:9153:b0:17a:4871:63fd with SMTP id x19-20020a056a20915300b0017a487163fdmr7462168pzc.0.1698854274903; Wed, 01 Nov 2023 08:57:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698854274; cv=none; d=google.com; s=arc-20160816; b=QY9H9oDCSjsssWZ7TYxQJdRgG1cnK8eFkJSKxdnfvvowamLySLnxEm4/hkBkqf7e9B 4MO0WgRdDeNsRmakdDT9zVL71GySU0K74io5imc56WSLrjPwqmtuPkAyj6ZihsZCMJb2 t5pss0RlqUB+s491iOoiM4ZsUy93Xr6fUqsY5BN/6wRJC1BH9upVToHQTqeEPC7xJ9BH dRmo+AER08T6AxkjBfgD0lLP0qWwNI8m0Fp7aFqOtVCm0Cuo8rvkLItfcq5sdIBQ+aEq w9+rW7L3yOcjIt6dhObLcZDsI4o9qrQKfElaaAtrv/Msf02OQV7N69jGe8gGWWAm2OeW Qduw== 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=YhOU82J6gtFbXATOdYHg9ph1z7E+qrxaje1ToC2RTQk=; fh=sB0U8KxukYYU9o4EJLPYxgOZhwGoPAc6O32V2p/6bWI=; b=OqRoSZ8/zoRrxlCUnFfCIyRntBw7x4cLSGyamHn/kPLYhUfUrxsuM3SbfcGbWsaMQW AY0ul/s6In3F48K83GwT4hQt/54UK3So6PZiknM3ionI3VNncHYeqJ3xknEOwcCTFFGf cbHG3a2Z7t1ZO/EMbwizRq3eMBUnkCQspA5GUVGw35k5b6PSaGeAyK5FJUXNFvfaUfrx fX0fBE/5DM/KRkMsO9Sn/ohpmhEw+Sz6StNi52XYGTf5Oxk/AwVCZl9oBEKkA4kS5wcw 6Ky0avfIZjFpmDNvnIZnmnmftjP+H4dlpEWeYLTyIsP7iEnXCwMHHFrc7MxmAp18DKHp 2ouQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=CffbJxxM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id e18-20020a656892000000b005ae8dda5ab5si119099pgt.899.2023.11.01.08.57.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 08:57:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=CffbJxxM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id AF7758079DC6; Wed, 1 Nov 2023 08:57:25 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232596AbjKAP46 (ORCPT + 99 others); Wed, 1 Nov 2023 11:56:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230074AbjKAP45 (ORCPT ); Wed, 1 Nov 2023 11:56:57 -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 3E190FD; Wed, 1 Nov 2023 08:56:50 -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 DD9761F74D; Wed, 1 Nov 2023 15:56:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1698854208; 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=YhOU82J6gtFbXATOdYHg9ph1z7E+qrxaje1ToC2RTQk=; b=CffbJxxMziIZIy4ia/GdXHp+0VgZdpc7Eg5Xw9ipYG6CMn+XjbMD+GsJkm+xTPzUMsMNcA 0wwmtNmnBOgH+Sx1kT/C43LZAaT6Y2hEr+7WIS96B/lRcZMyDudwJy4kzZPB9GiuiA35Cf tAl9rkZ1ieBuy1s5x5gB7slhsmnKhgA= 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 89AE613460; Wed, 1 Nov 2023 15:56:48 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id NlreIEB1QmXcMwAAMHmgww (envelope-from ); Wed, 01 Nov 2023 15:56:48 +0000 Date: Wed, 1 Nov 2023 16:56:47 +0100 From: Michal =?utf-8?Q?Koutn=C3=BD?= To: Dmitry Rokosov Cc: hannes@cmpxchg.org, mhocko@kernel.org, roman.gushchin@linux.dev, shakeelb@google.com, muchun.song@linux.dev, akpm@linux-foundation.org, kernel@sberdevices.ru, rockosov@gmail.com, cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org Subject: Re: [PATCH v1] tools/cgroup: introduce cgroup v2 memory.events listener Message-ID: References: <20231013184107.28734-1-ddrokosov@salutedevices.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="n2vvgyykebaacuqp" Content-Disposition: inline In-Reply-To: <20231013184107.28734-1-ddrokosov@salutedevices.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 01 Nov 2023 08:57:25 -0700 (PDT) --n2vvgyykebaacuqp Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi. I think the tools/cgroup/cgroup_event_listener.c was useful in the past to demonstrate the non-traditional API of cgroup.event_control with FDs passing left and right. On Fri, Oct 13, 2023 at 09:41:07PM +0300, Dmitry Rokosov wrote: > This is a simple listener for memory events that handles counter > changes in runtime. It can be set up for a specific memory cgroup v2. Event files on v2 are based on more standard poll or inotify APIs so they don't need such a (cgroup specific) demo. Additionally, the demo program lists individual events, so it'd be a maintenance burden to keep them in sync with the kernel implementation. My .02=E2=82=AC, Michal --n2vvgyykebaacuqp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQQpEWyjXuwGT2dDBqAGvrMr/1gcjgUCZUJ1PQAKCRAGvrMr/1gc jvhcAQCUjTNWbtpe3NaqFagBmyBnMYqk8L1TerFT4RmMIyjOWwD/fvrevKAsZOxp e6hUE/uLByN0AfsTqVtXgPo/ZtnjYwo= =9QWy -----END PGP SIGNATURE----- --n2vvgyykebaacuqp--