mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] delayacct: optimization & code simplify
@ 2023-10-08 10:49 brookxu.cn
  2023-10-08 10:49 ` [PATCH 1/3] delayacct: introduce delayacct_enabled() to simplify implement brookxu.cn
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: brookxu.cn @ 2023-10-08 10:49 UTC (permalink / raw)
  To: bsingharora, juri.lelli, peterz, vincent.guittot; +Cc: linux-kernel

From: Chunguang Xu <chunguang.xu@shopee.com>

Since in some scenarios we still want to get the task delayacct
through taskstats, so commit <0cd7c741f01de> introduces a sysctl to
enable it dynamically. However, since task->delays is allocated
during fork(), task->delays will not be reallocated when delayacct
is enabled later. This will make we cannot get the delayacct of old
tasks, but the new tasks cans. This can easily lead to confusion.
Therefore, try to workaround this issue by convert task->delays to
an object, just like sched_statistics. Besides, try to simplify the
code of delayacct.

Chunguang Xu (3):
  delayacct: introduce delayacct_enabled() to simplify implement
  delayacct: convert task->delays to a object
  delayacct: remove delayacct_on to simplify the code

 include/linux/delayacct.h |  83 +++++-------------------
 include/linux/sched.h     |   3 +-
 kernel/delayacct.c        | 129 ++++++++++++++++++--------------------
 kernel/fork.c             |   7 +--
 4 files changed, 81 insertions(+), 141 deletions(-)

-- 
2.25.1


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

end of thread, other threads:[~2023-10-09 14:18 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-08 10:49 [PATCH 0/3] delayacct: optimization & code simplify brookxu.cn
2023-10-08 10:49 ` [PATCH 1/3] delayacct: introduce delayacct_enabled() to simplify implement brookxu.cn
2023-10-08 10:56   ` Peter Zijlstra
2023-10-08 11:03     ` brookxu
2023-10-08 10:49 ` [PATCH 2/3] delayacct: convert task->delays to a object brookxu.cn
2023-10-08 10:58   ` Peter Zijlstra
2023-10-08 11:10     ` brookxu
2023-10-09  8:43       ` Peter Zijlstra
2023-10-09 10:29         ` brookxu
2023-10-09 14:17           ` Peter Zijlstra
2023-10-09 11:38         ` brookxu
2023-10-09 14:18           ` Peter Zijlstra
2023-10-08 13:42   ` kernel test robot
2023-10-08 15:47   ` kernel test robot
2023-10-08 16:18   ` kernel test robot
2023-10-08 10:49 ` [PATCH 3/3] delayacct: remove delayacct_on to simplify the code brookxu.cn

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

Powered by JetHome