From: Bradley Morgan <brads@mainlining.org>
To: Balbir Singh <balbirs@nvidia.com>
Cc: Bradley Morgan <brads@mainlining.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH 0/4] taskstats: four more tidy-ups in the genl path
Date: Sun, 1 Nov 2026 00:56:12 +0000 [thread overview]
Message-ID: <20261101005616.3022705-1-brads@mainlining.org> (raw)
Four small cleanups from reading kernel/taskstats.c again. No functional
change in any of them.
Patch 1 uses nla_put_u32() in mk_reply() instead of open coding the u32
attribute with nla_put() and a sizeof/& pair.
Patch 2 grabs the inode once with file_inode() in exe_add_tsk(), which
walks exe_file->f_inode twice today, once for the device and once for the
number.
Patch 3 reads the cgroupstats fd out of na, which the function already
fetched, instead of indexing info->attrs[] again for the same attribute.
Patch 4 converts the elapsed time with div_u64() in
tgid_stats_add_task(), like the utime and stime lines four below it do,
instead of do_div().
Balbir Singh has moved to balbirs@nvidia.com, MAINTAINERS still lists the
old gmail address.
Bradley Morgan (4):
taskstats: use nla_put_u32() in mk_reply()
taskstats: take the inode once in exe_add_tsk()
taskstats: reuse na in cgroupstats_user_cmd()
taskstats: use div_u64() for the elapsed time in tgid_stats_add_task()
kernel/taskstats.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
--
2.53.0
next reply other threads:[~2026-11-01 0:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-01 0:56 Bradley Morgan [this message]
2026-11-01 0:57 ` [PATCH 1/4] taskstats: use nla_put_u32() in mk_reply() Bradley Morgan
2026-11-01 0:57 ` [PATCH 2/4] taskstats: take the inode once in exe_add_tsk() Bradley Morgan
2026-11-01 0:57 ` [PATCH 3/4] taskstats: reuse na in cgroupstats_user_cmd() Bradley Morgan
2026-11-01 0:57 ` [PATCH 4/4] taskstats: use div_u64() for the elapsed time in tgid_stats_add_task() Bradley Morgan
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=20261101005616.3022705-1-brads@mainlining.org \
--to=brads@mainlining.org \
--cc=akpm@linux-foundation.org \
--cc=balbirs@nvidia.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®