From: "brookxu.cn" <brookxu.cn@gmail.com>
To: bsingharora@gmail.com, juri.lelli@redhat.com,
peterz@infradead.org, vincent.guittot@linaro.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 0/3] delayacct: optimization & code simplify
Date: Sun, 8 Oct 2023 18:49:35 +0800 [thread overview]
Message-ID: <cover.1696761522.git.chunguang.xu@shopee.com> (raw)
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
next reply other threads:[~2023-10-08 10:49 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-08 10:49 brookxu.cn [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1696761522.git.chunguang.xu@shopee.com \
--to=brookxu.cn@gmail.com \
--cc=bsingharora@gmail.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=vincent.guittot@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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