mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Eric Dumazet <dada1@cosmosbay.com>,
	linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH, take3] getrusage() : Fill ru_inblock and ru_oublock fields if possible
Date: Mon, 19 Mar 2007 14:30:58 -0700	[thread overview]
Message-ID: <20070319143058.f2a4af1b.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070319143723.GA152@tv-sign.ru>

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.


      parent reply	other threads:[~2007-03-19 21:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-19 12:02 Eric Dumazet
2007-03-19 14:37 ` Oleg Nesterov
2007-03-19 14:52   ` Eric Dumazet
2007-03-19 21:30   ` Andrew Morton [this message]

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=20070319143058.f2a4af1b.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=dada1@cosmosbay.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@tv-sign.ru \
    /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

Powered by JetHome