lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201123125808.50896-1-laoar.shao@gmail.com>
Date:   Mon, 23 Nov 2020 20:58:03 +0800
From:   Yafang Shao <laoar.shao@...il.com>
To:     mgorman@...e.de, mingo@...hat.com, peterz@...radead.org,
        juri.lelli@...hat.com, vincent.guittot@...aro.org,
        dietmar.eggemann@....com, rostedt@...dmis.org, bsegall@...gle.com,
        bristot@...hat.com
Cc:     linux-kernel@...r.kernel.org, linux-rt-users@...r.kernel.org,
        Yafang Shao <laoar.shao@...il.com>
Subject: [RFC PATCH v2 0/5] sched: support schedstat for RT sched class 

We want to measure the latency of RT tasks in our production
environment with schedstat facility, but currently schedstat is only
supported for fair sched class. This patchset enable it for RT sched class
as well.

The schedstat statistics are defined in struct sched_entity, which is a
member of struct task_struct, so we can resue it for RT sched class.

The schedstat usage in RT sched class is similar with fair sched class,
for example,
                fair                            RT
enqueue         update_stats_enqueue_fair       update_stats_enqueue_rt
dequeue         update_stats_dequeue_fair       update_stats_dequeue_rt
put_prev_task   update_stats_wait_start         update_stats_wait_start
set_next_task   update_stats_wait_end           update_stats_wait_end
show            /proc/[pid]/sched               /proc/[pid]/sched

The sched:sched_stats_* tracepoints can be used to trace RT tasks as
well after that patchset.

PATCH #1 ~ #4 are the preparation of PATCH #5.

- v2:
keep the schedstats functions inline, per Mel.

Yafang Shao (5):
  sched: don't include stats.h in sched.h
  sched: define task_of() as a common helper
  sched: make schedstats helper independent of cfs_rq
  sched: define update_stats_curr_start() as a common helper
  sched, rt: support schedstat for RT sched class

 kernel/sched/core.c      |   1 +
 kernel/sched/deadline.c  |   1 +
 kernel/sched/debug.c     |   1 +
 kernel/sched/fair.c      | 174 ++-------------------------------------
 kernel/sched/idle.c      |   1 +
 kernel/sched/rt.c        |  94 ++++++++++++++++++++-
 kernel/sched/sched.h     |  30 ++++++-
 kernel/sched/stats.c     |   1 +
 kernel/sched/stats.h     | 146 ++++++++++++++++++++++++++++++++
 kernel/sched/stop_task.c |   1 +
 10 files changed, 280 insertions(+), 170 deletions(-)

-- 
2.18.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ