public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] sched/psi: Allow unprivileged PSI polling
@ 2023-03-09 17:07 Domenico Cerasuolo
  2023-03-09 17:07 ` [PATCH 1/4] sched/psi: rearrange polling code in preparation Domenico Cerasuolo
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Domenico Cerasuolo @ 2023-03-09 17:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: peterz, surenb, brauner, chris, hannes, Domenico Cerasuolo

PSI offers 2 mechanisms to get information about a specific resource
pressure. One is reading from /proc/pressure/<resource>, which gives
average pressures aggregated every 2s. The other is creating a pollable
fd for a specific resource and cgroup.

The trigger creation requires CAP_SYS_RESOURCE, and gives the
possibility to pick specific time window and threshold, spawing an RT
thread to aggregate the data.

Systemd would like to provide containers the option to monitor pressure
on their own cgroup and sub-cgroups. For example, if systemd launches a
container that itself then launches services, the container should have
the ability to poll() for pressure in individual services. But neither
the container nor the services are privileged.

The series is implemented in 4 steps in order to reduce the noise of
the change.

Domenico Cerasuolo (4):
  sched/psi: rearrange polling code in preparation
  sched/psi: rename existing poll members in preparation
  sched/psi: extract update_triggers side effect
  sched/psi: allow unprivileged polling of N*2s period

 Documentation/accounting/psi.rst |   4 +
 include/linux/psi.h              |   2 +-
 include/linux/psi_types.h        |  43 ++--
 kernel/cgroup/cgroup.c           |   2 +-
 kernel/sched/psi.c               | 412 ++++++++++++++++---------------
 5 files changed, 250 insertions(+), 213 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-03-22 16:41 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-09 17:07 [PATCH 0/4] sched/psi: Allow unprivileged PSI polling Domenico Cerasuolo
2023-03-09 17:07 ` [PATCH 1/4] sched/psi: rearrange polling code in preparation Domenico Cerasuolo
2023-03-20 21:06   ` Suren Baghdasaryan
2023-03-09 17:07 ` [PATCH 2/4] sched/psi: rename existing poll members " Domenico Cerasuolo
2023-03-20 21:19   ` Suren Baghdasaryan
2023-03-09 17:07 ` [PATCH 3/4] sched/psi: extract update_triggers side effect Domenico Cerasuolo
2023-03-20 23:00   ` Suren Baghdasaryan
     [not found]     ` <CA+CLi1g=70ot=YFL+xug3jC4OXG727NGo+NXxmC45WcwaFpo8g@mail.gmail.com>
2023-03-22  3:40       ` Suren Baghdasaryan
     [not found]         ` <CA+CLi1gjKFFgoeHQs-sNn1knqk1w9rb73kaOqP9z8TUwwiqqFQ@mail.gmail.com>
2023-03-22 16:41           ` Suren Baghdasaryan
2023-03-09 17:07 ` [PATCH 4/4] sched/psi: allow unprivileged polling of N*2s period Domenico Cerasuolo
2023-03-20 23:17   ` Suren Baghdasaryan
2023-03-13 15:29 ` [PATCH 0/4] sched/psi: Allow unprivileged PSI polling Suren Baghdasaryan
2023-03-14 16:10   ` Johannes Weiner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox