From: Balbir Singh <bsingharora@gmail.com>
To: Weiping Zhang <zwp10758@gmail.com>
Cc: sblbir@amazon.com, davem@davemloft.net,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH v2] taskstats: add /proc/taskstats to fetch pid/tgid status
Date: Thu, 11 Feb 2021 13:35:11 +1100 [thread overview]
Message-ID: <20210211023511.GE286763@balbir-desktop> (raw)
In-Reply-To: <CAA70yB74AH6J0iuhd5s4ONDVh71fEuh3Kr625H_CypyMP0Te+Q@mail.gmail.com>
> > Still not convinced about it, I played around with it. The reason we did not
> > use ioctl in the first place is to get the benefits of TLA with netlink, which
> For monitoring long-time-running process the ioctl can meet our requirement,
> it is more simple than netlink when we get the real user data(struct taskstats).
> The netlink mode needs construct/parse extra strcutures like struct msgtemplate,
> struct nlmsghdr, struct genlmsghdr. The ioctl mode only has one
> structure (struct taskstats).
> For complicated user case the netlink mode is more suitable, for this
> simple user case
> the ioctl mode is more suitable. From the test results we can see that
> ioctl can save CPU
> resource, it's useful to build a light-weight monitor tools.
I think your missing the value of TLA and the advantages of async
send vs recv
> > ioctl's miss. IMHO, the overhead is not very significant even for
> > 10,000 processes in your experiment. I am open to considering enhancing the
> > interface to do a set of pid's.
> It's a good approach to collect data in batch mode, I think we can support it in
> both netlink and ioctl mode.
>
> Add ioctl can give user mode choice and make user code more simple, it seems no
> harm to taskstats framework, I'd like to support it.
>
> Thanks very much
In general the ioctl interface is quite fragile, conflicts in ioctl numbers,
inability to check the types of the parameters passed in and out makes it
not so good. Not to mention versioning issues, with the genl interface we have
the flexibility to version requests. I would really hate to have two ways to
do the same thing.
The overhead is there, do you see the overhead of 20ms per 10,000 calls significant?
Does it affect your use case significantly?
Balbir Singh
next prev parent reply other threads:[~2021-02-11 2:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-17 17:00 [RFC PATCH v2] taskstats: add /proc/taskstats to fetch pid/tgid status Weiping Zhang
2020-12-28 14:10 ` Weiping Zhang
2021-01-22 14:07 ` Weiping Zhang
2021-01-27 11:13 ` Balbir Singh
2021-01-31 9:16 ` Weiping Zhang
2021-02-04 10:20 ` Balbir Singh
2021-02-04 14:37 ` Weiping Zhang
2021-02-05 0:08 ` Balbir Singh
2021-02-05 2:43 ` Weiping Zhang
2021-02-08 5:55 ` Balbir Singh
2021-02-10 12:30 ` Weiping Zhang
2021-02-11 2:35 ` Balbir Singh [this message]
2021-01-27 11:07 ` Balbir Singh
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=20210211023511.GE286763@balbir-desktop \
--to=bsingharora@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=sblbir@amazon.com \
--cc=zwp10758@gmail.com \
/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