lkml.org 
[lkml]   [2007]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH, take3] getrusage() : Fill ru_inblock and ru_oublock fields if possible
On Mon, 19 Mar 2007 17:37:23 +0300
Oleg Nesterov <oleg@tv-sign.ru> wrote:

> On 03/19, Eric Dumazet wrote:
> >
> > [...snip...]
> > do {
> > utime = cputime_add(utime, t->utime);
> > @@ -2040,6 +2045,8 @@ static void k_getrusage(struct task_stru
> > r->ru_nivcsw += t->nivcsw;
> > r->ru_minflt += t->min_flt;
> > r->ru_majflt += t->maj_flt;
> > + r->ru_inblock += task_io_get_inblock(t);
> > + r->ru_oublock += task_io_get_oublock(t);
> > t = next_thread(t);
> > } while (t != p);
>
> (offtopic)
>
> We are reading u64 read_bytes/write_bytes which could be updated asynchronously.
> /proc/pid/io does the same.

Yup, as noted in the Documentation/filesystems/proc.txt documentation ;)

> Of course, I don't blame this patch, just a stupid question: can we do something?
> I guess not.

Yes, I find it hard to justify the additional expense which fixing this
would cause.

Which probably means that someone will find it terribly terribly important
and we have to go and do something horrid anyway. Sigh.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-03-19 22:35    [W:0.077 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site