public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2][RFC] Makes sd->flags sysctl writable
@ 2020-07-06 19:36 Chen Yu
  2020-07-06 19:36 ` [PATCH 1/2][RFC] sched/topology: Add update_domain_cpu() Chen Yu
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Chen Yu @ 2020-07-06 19:36 UTC (permalink / raw)
  To: Peter Zijlstra, Valentin Schneider
  Cc: Vincent Guittot, Ingo Molnar, Juri Lelli, Dietmar Eggemann,
	Steven Rostedt, Ben Segall, Mel Gorman, linux-kernel, Chen Yu

It was found that recently the flags of sched domain could
not be customized via sysctl, which might make it a little
inconenient for performance tuning/debugging.

echo 343 > /proc/sys/kernel/sched_domain/cpu0/domain0/flags
bash: flags: Permission denied

343 stands for:
(SD_BALANCE_NEWIDLE SD_BALANCE_EXEC SD_BALANCE_FORK SD_WAKE_AFFINE)

As mentioned in Commit 9818427c6270 ("sched/debug: Make sd->flags
sysctl read-only"), the flags field is made read-only, due to the
concerns that the sd flags and the per cpu cache domain pointer are
not coherent.

This trial patch tries to address the issue by updating the cache
domain pointer once the flag has been modified. So that the sd->flags
could be changed via sysctl.

I'm not sure if there is other purpose that we've set the flags to
read-only, but it seems that keeping the sd->flags writable could
help diagnose the system easier. Any comment would be appreciated.

Chen Yu (2):
  sched/topology: Add update_domain_cpu()
  sched/debug: Make sd->flags sysctl writable again

 include/linux/sched/topology.h |  5 +++++
 kernel/sched/debug.c           | 30 +++++++++++++++++++++++++++---
 kernel/sched/topology.c        | 11 +++++++++++
 3 files changed, 43 insertions(+), 3 deletions(-)

-- 
2.17.1


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

end of thread, other threads:[~2020-07-08 10:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-06 19:36 [PATCH 0/2][RFC] Makes sd->flags sysctl writable Chen Yu
2020-07-06 19:36 ` [PATCH 1/2][RFC] sched/topology: Add update_domain_cpu() Chen Yu
2020-07-06 19:37 ` [PATCH 2/2][RFC] sched/debug: Make sd->flags sysctl writable again Chen Yu
2020-07-06 20:00 ` [PATCH 0/2][RFC] Makes sd->flags sysctl writable Peter Zijlstra
2020-07-06 22:11   ` Valentin Schneider
2020-07-07 11:56     ` Chen Yu
2020-07-08 10:49       ` Valentin Schneider
2020-07-07 11:44   ` Chen Yu

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