delayacct: optimization & code simplify
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 9 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | delayacct: introduce delayacct_enabled() to simplify implementinclude/ kernel/ | +21 | 2 replies | |
| 2/3 | delayacct: convert task->delays to a objectinclude/ include/ kernel/ +1 more | +60 | 7 replies | |
| 3/3 | delayacct: remove delayacct_on to simplify the codeinclude/ kernel/ | +4 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] delayacct: optimization & code simplify
From: Chunguang Xu <[email protected]>
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(-)
Signature · 1 line
2.25.1