Received: by 2002:a05:7208:3228:b0:82:47:81bb with SMTP id cb40csp2634789rbb; Tue, 16 Apr 2024 07:23:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXhyO3f83xUtKT4QvAZMwock9PxpNaj4JnMDJYgJamQpNxMNWaSGnODg/0vsDvRFx7qVxvsmFjqHmQajKCHCUYVvO2ZSphlq9+gxsYlpg== X-Google-Smtp-Source: AGHT+IEcLG73jLKwxJ0wuizNfSS9FxoPtPo88yYvI8ayb/JCRkPXJZwNvDqxYfvOFrAim0Kbq17K X-Received: by 2002:a05:6102:3052:b0:47a:3bc6:c4a6 with SMTP id w18-20020a056102305200b0047a3bc6c4a6mr13848190vsa.10.1713277426900; Tue, 16 Apr 2024 07:23:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713277426; cv=pass; d=google.com; s=arc-20160816; b=YtQ1/nXTqDZlutYmxgIsAlN5MseKI6vgNuP1RsTC7LnWB6f0cu7Iw11Iawbytl41ah yJCQtZ6WSnUrkH1LAxWV+o/X1CQavu6rmPvj/JkP1fu0ZrltuIjUDkKrMypKNmN6IR4S L3SzsIQNroIWMSY4w3onoaMdPKQ8i8Cvs7MitSIbHpDWIyUaPK/1TVDdq8e/uSCnAVDv U06aH1wRFeR4pU5n39Q7AYYsyeaQqMkerxsGx7G97GUg6rR4rjsOv75D0sfthklHM+/X nQi3TXI54+J3QYo3RhD4wThVDZwWVpiheVQWocLUwbijSwcIRmyC4mHpoHt0eurg/ybs bjDg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature:dkim-signature; bh=nm9OmMNv+yRwBNQE7fNDtbSWePhkSHjqXbgzKdCZ+YE=; fh=bFL5SyymtwJ59P97wjgEhjTl1UzUYXXY3RK7ihbPMDs=; b=Rhko+b9W/xk17sYKEobmto1wRIWpgXMZsRnaN1wuOU9CyLQvi03NJQmwLGOwS4pWYI M1gEqhJliqZUfsrtXuHrrTpH58OkYYTxDD9xEJDrW+ZhECIA/4tH8EOe+pOZDwU6W5Q+ eoBdalDDYchBYLeEkYKRaMnddsTH1IJ5rzZ879v90r84iGmvdVkTjiFwYWePY9NTtPOd geMjwANd0YXdSrf+PuIAllEX82FRd48vxa5mC+rYCWSfTxfCwrWdXB8l80ZhyyUlr34i KodR1139F5jwv40fZrGpmVN0+sbblbQ3/GBbslo9r9FMOKzwZGa/DbnpThVCJaqDZkgS 1G2g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=thnaB9WR; dkim=pass header.i=@suse.com header.s=susede1 header.b=VxIn4lUJ; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-146994-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146994-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id o12-20020a05610232cc00b0047b8dd15b31si635831vss.340.2024.04.16.07.23.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 07:23:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-146994-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=thnaB9WR; dkim=pass header.i=@suse.com header.s=susede1 header.b=VxIn4lUJ; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-146994-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146994-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 9EC8B1C20AF4 for ; Tue, 16 Apr 2024 14:23:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7D8A0133997; Tue, 16 Apr 2024 14:20:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="thnaB9WR"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="VxIn4lUJ" Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BC356130A4A; Tue, 16 Apr 2024 14:20:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713277219; cv=none; b=Fj/iYIIbsIJXvjzAhSs3nIGzo2j0XChDt5Y7ihv6d88WefwA7e/ffdnl++omZVJg3MLrwfppuGQ5HUtIsgSQwW0WL9DEAlB7U09IZXAiVuhbtc7D3yqYfpc6Yx7Zrljiiu1k6pZe6xCkNVbSYRRbBI7O9b4XQxD2XcEcW9rWTfU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713277219; c=relaxed/simple; bh=fnjq1zyVvQYgrXF/wl6IPhboOrjktoNVcF7GsyNF6J0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=rdh13cX4K7HqtxJDDAiR1zm/MGUJ0BiVhUx/dRNCb0GinBGEh+GWgM0ZWo+A1frFZMYZEnzKlwM+XXdSmSEIxcuEY7onI8ObQXd3/t/r6aa3oISpUtDzKJ1d61fV00mZbskbW2ZOKfixNLbM86sGCg1rRes2Ezlc1yp7BZ5OBgA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=thnaB9WR; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=VxIn4lUJ; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id DD3F95F88B; Tue, 16 Apr 2024 14:20:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1713277216; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nm9OmMNv+yRwBNQE7fNDtbSWePhkSHjqXbgzKdCZ+YE=; b=thnaB9WR0St7tGY09yQ+nPsqkuehI0QaZgj1S88dnqFAnY8adn5NtDz6dYVS4csShddw4e auRQek7jlqpUxKY6oWpecJn7xqzYPYCRiXEgVKPKBCyOoQF4UZojM8+lhne1xQqUgeXrIN hKBBoOzYOWWHnhkblat4cwn8LT/MRt0= Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1713277215; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nm9OmMNv+yRwBNQE7fNDtbSWePhkSHjqXbgzKdCZ+YE=; b=VxIn4lUJa+KYM9eJosRsp5HmLK+riJ4QcV7BJd20Iqks4xoaHqJUuwOuigUFk5Sq1Q++7q +F6ga5S/ogp+S6/bClh+qGtI21RTAox7WIt8g9wvnELHmNhAGIg8eMHQyn4LEqDbMH7sLo t+L44TGsqSu90O/Weysd/u30WCQY4VQ= Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id C1BD513931; Tue, 16 Apr 2024 14:20:15 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id fG4aLx+JHmbAbQAAD6G6ig (envelope-from ); Tue, 16 Apr 2024 14:20:15 +0000 From: =?UTF-8?q?Michal=20Koutn=C3=BD?= To: cgroups@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Cc: Tejun Heo , Zefan Li , Johannes Weiner , Jonathan Corbet , Shuah Khan , Muhammad Usama Anjum Subject: [PATCH v4 0/6] pids controller events rework Date: Tue, 16 Apr 2024 16:20:08 +0200 Message-ID: <20240416142014.27630-1-mkoutny@suse.com> X-Mailer: git-send-email 2.44.0 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-Transfer-Encoding: 8bit X-Spam-Level: X-Spamd-Result: default: False [-2.08 / 50.00]; BAYES_HAM(-1.78)[93.67%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCPT_COUNT_SEVEN(0.00)[10]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns] X-Spam-Score: -2.08 X-Spam-Flag: NO This makes pids.events:max affine to pids.max limit. How are the new events supposed to be useful? - pids.events.local:max - tells that cgroup's limit is hit (too tight?) - pids.events:* - "only" directs top-down search to cgroups of interest Changes from v3 (https://lore.kernel.org/r/20240405170548.15234-1-mkoutny@suse.com) - use existing functions for TAP output in selftest (Muhammad) - formatting in selftest (Muhammad) - remove pids.events:max.imposed event, keep it internal (Johannes) - allow legacy behavior with a mount option - detach migration charging patches - drop RFC prefix Changes from v2 (https://lore.kernel.org/r/20200205134426.10570-1-mkoutny@suse.com) - implemented pids.events.local (Tejun) - added migration charging [1] https://lore.kernel.org/r/20230202155626.1829121-1-hannes@cmpxchg.org/ Michal Koutný (6): cgroup/pids: Remove superfluous zeroing cgroup/pids: Separate semantics of pids.events related to pids.max cgroup/pids: Make event counters hierarchical cgroup/pids: Add pids.events.local selftests: cgroup: Lexicographic order in Makefile selftests: cgroup: Add basic tests for pids controller Documentation/admin-guide/cgroup-v1/pids.rst | 3 +- Documentation/admin-guide/cgroup-v2.rst | 12 ++ include/linux/cgroup-defs.h | 7 +- kernel/cgroup/cgroup.c | 15 +- kernel/cgroup/pids.c | 131 +++++++++++--- tools/testing/selftests/cgroup/.gitignore | 11 +- tools/testing/selftests/cgroup/Makefile | 25 +-- tools/testing/selftests/cgroup/test_pids.c | 178 +++++++++++++++++++ 8 files changed, 341 insertions(+), 41 deletions(-) create mode 100644 tools/testing/selftests/cgroup/test_pids.c base-commit: 026e680b0a08a62b1d948e5a8ca78700bfac0e6e -- 2.44.0