From: Oleg Nesterov <oleg@tv-sign.ru>
To: Eric Dumazet <dada1@cosmosbay.com>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH, take2] getrusage() : Fill ru_inblock and ru_oublock fields if possible
Date: Mon, 19 Mar 2007 13:53:58 +0300 [thread overview]
Message-ID: <20070319105358.GA152@tv-sign.ru> (raw)
In-Reply-To: <200703191139.40281.dada1@cosmosbay.com>
On 03/19, Eric Dumazet wrote:
>
> +static inline unsigned long task_io_get_inblock(const struct task_struct *p)
> +{
> + return p->ioac.read_bytes >> 9;
> +}
>
> [...snip...]
>
> @@ -2021,6 +2022,8 @@ static void k_getrusage(struct task_stru
> r->ru_nivcsw = p->signal->cnivcsw;
> r->ru_minflt = p->signal->cmin_flt;
> r->ru_majflt = p->signal->cmaj_flt;
> + r->ru_inblock = p->signal->cinblock;
> + r->ru_oublock = p->signal->coublock;
>
> if (who == RUSAGE_CHILDREN)
> break;
> @@ -2032,6 +2035,8 @@ static void k_getrusage(struct task_stru
> r->ru_nivcsw += p->signal->nivcsw;
> r->ru_minflt += p->signal->min_flt;
> r->ru_majflt += p->signal->maj_flt;
> + r->ru_inblock += task_io_get_inblock(p->signal);
p->signal is "struct signal_struct *", not "struct task_struct *" as
task_io_get_inblock() expects ?
Oleg.
next prev parent reply other threads:[~2007-03-19 10:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-19 10:39 Eric Dumazet
2007-03-19 10:53 ` Oleg Nesterov [this message]
2007-03-19 11:13 ` Eric Dumazet
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=20070319105358.GA152@tv-sign.ru \
--to=oleg@tv-sign.ru \
--cc=akpm@linux-foundation.org \
--cc=dada1@cosmosbay.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®