Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp293189ybv; Wed, 5 Feb 2020 05:45:48 -0800 (PST) X-Google-Smtp-Source: APXvYqyfz7HHtCD8z7co/a+t6IE5tEzsc/8gr98IVcNGht1enAxgBLZ/k8dEkAwarQPuXw/o7NwJ X-Received: by 2002:a05:6830:1d55:: with SMTP id p21mr25931254oth.145.1580910348153; Wed, 05 Feb 2020 05:45:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580910348; cv=none; d=google.com; s=arc-20160816; b=f2BZeTlhjKOul7WDVJbSK7X/YHOBcJ0Ke/MkLpZyEx9fZgnHok47JCoLLAeuOu6pCQ oyVTzDETqLVgk5E6j8F3oSCSxMhjh78MO06qvbQzhHdrn9D15bvBq8i1FI0HHUncd8rw 68AxoXccLEMr3FY3yvgvyAmeqY4tZnsaPqq6JHBlYvBhRrz14BtrPuEN+zWsQyydaiUl E9Kc9/79jw97IsWFvQR9AzIoidMVGXlqqQZaXU+rkwvNUSNn4nLMXJQFqrJxWmalt7pn IkirszJZXyBktlkBv1UJILdcMkeexrgy3bErrQCD/RPGOBb0O3rSydbTD6dsx4WeSkDJ /e4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=G7ROvOxZxlCkfAyHMYQcRGzz88Nk0+l9YZ655Vb77N0=; b=tc1LjxL6GhRdKdrhgZdDCVPh4X584HBPcBJ0SNxwFQeQe7apOZkcsUK42QZEa0tiRI ro6E700KJ6uO52PifmADqi3KEJUxoXiMK5AEOTgD0n6pWbEyEIbxrgWey+7oHLSdBViQ P7j+tjjLx888o+eE5lLKGAa2WvEuHwvZBh0ppEm69vQ4IwFNXaRM0GtFDG+wp3k9gcav cqW7hTETDumOdEoH+fLFaGgCcHG45GadYuYThBQ+Ulkk/eow2YWeFVS9iHSd1XQGxYRD xfLgWCyPS2lwz6I0dC086B5qtsXA9bGuvGogokHlZOG1O08KPmwgy8BcHYuGb5nIStrw DZ5Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r5si11624807oic.19.2020.02.05.05.45.34; Wed, 05 Feb 2020 05:45:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728028AbgBENok (ORCPT + 99 others); Wed, 5 Feb 2020 08:44:40 -0500 Received: from mx2.suse.de ([195.135.220.15]:52246 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726308AbgBENok (ORCPT ); Wed, 5 Feb 2020 08:44:40 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 6317FAF7E; Wed, 5 Feb 2020 13:44:38 +0000 (UTC) From: =?UTF-8?q?Michal=20Koutn=C3=BD?= To: cgroups@vger.kernel.org Cc: Tejun Heo , Li Zefan , Johannes Weiner , Aleksa Sarai , linux-kernel@vger.kernel.org Subject: [RFC PATCH v2 0/3] cgroup/pids: Make pids.events notifications affine to pids.max Date: Wed, 5 Feb 2020 14:44:23 +0100 Message-Id: <20200205134426.10570-1-mkoutny@suse.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191128172612.10259-1-mkoutny@suse.com> References: <20191128172612.10259-1-mkoutny@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently, when pids.max limit is breached in the hierarchy, the event is counted and reported in the cgroup where the forking task resides. This isn't hierarchical neither binds event to its limit Reasons for RFC: 1) Introduction of new event type. 2) Missing one step further would be to distinguish pids.events and pids.events.local. Changes from v1: https://lkml.kernel.org/r/20191128172612.10259-1-mkoutny@suse.com - introduce two separate types of events - make event counting hierarchical Michal Koutný (3): cgroup/pids: Separate semantics of pids.events related to pids.max cgroup/pids: Make event counters hierarchical selftests: cgroup: Add basic tests for pids controller Documentation/admin-guide/cgroup-v1/pids.rst | 3 +- Documentation/admin-guide/cgroup-v2.rst | 14 ++ kernel/cgroup/pids.c | 92 +++++++-- tools/testing/selftests/cgroup/Makefile | 8 +- tools/testing/selftests/cgroup/test_pids.c | 188 +++++++++++++++++++ 5 files changed, 288 insertions(+), 17 deletions(-) create mode 100644 tools/testing/selftests/cgroup/test_pids.c -- 2.24.1