aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/string_helpers.h
diff options
context:
space:
mode:
authorShakeel Butt <shakeelb@google.com>2021-03-21 13:51:56 -0700
committerPeter Zijlstra <peterz@infradead.org>2021-03-23 16:01:58 +0100
commitdf77430639c9cf73559bac0f25084518bf9a812d (patch)
tree40304bb11219aeedc1f10133b2ec513c5bf2a0e7 /include/linux/string_helpers.h
parentstop_machine: Add caller debug info to queue_stop_cpus_work (diff)
downloadwireguard-linux-df77430639c9cf73559bac0f25084518bf9a812d.tar.xz
wireguard-linux-df77430639c9cf73559bac0f25084518bf9a812d.zip
psi: Reduce calls to sched_clock() in psi
We noticed that the cost of psi increases with the increase in the levels of the cgroups. Particularly the cost of cpu_clock() sticks out as the kernel calls it multiple times as it traverses up the cgroup tree. This patch reduces the calls to cpu_clock(). Performed perf bench on Intel Broadwell with 3 levels of cgroup. Before the patch: $ perf bench sched all # Running sched/messaging benchmark... # 20 sender and receiver processes per group # 10 groups == 400 processes run Total time: 0.747 [sec] # Running sched/pipe benchmark... # Executed 1000000 pipe operations between two processes Total time: 3.516 [sec] 3.516689 usecs/op 284358 ops/sec After the patch: $ perf bench sched all # Running sched/messaging benchmark... # 20 sender and receiver processes per group # 10 groups == 400 processes run Total time: 0.640 [sec] # Running sched/pipe benchmark... # Executed 1000000 pipe operations between two processes Total time: 3.329 [sec] 3.329820 usecs/op 300316 ops/sec Signed-off-by: Shakeel Butt <shakeelb@google.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Link: https://lkml.kernel.org/r/20210321205156.4186483-1-shakeelb@google.com
Diffstat (limited to 'include/linux/string_helpers.h')
0 files changed, 0 insertions, 0 deletions