lkml.org 
[lkml]   [2007]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: + getrusage-fill-ru_inblock-and-ru_oublock-fields-if-possible.patch added to -mm tree
Eric Dumazet wrote:
>
> @@ -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 = task_io_get_inblock(p);
> + r->ru_oublock = task_io_get_oublock(p);
>
> 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);
> + r->ru_oublock += task_io_get_oublock(p);
> t = p;
> 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);

I can't understand this. Consider k_getrusage(RUSAGE_BOTH). The end result
is that r->ru_inblock == 3 * task_io_get_inblock(p).

No?

Oleg.

-
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-16 18:09    [W:0.048 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site