Re: taskstats root only breaking iotop

From: Linus Torvalds
Date: Sat Oct 01 2011 - 17:59:55 EST

On Sat, Oct 1, 2011 at 2:54 PM, Guillaume Chazarain <guichaz@xxxxxxxxx> wrote:
> With taskstats being root only, what's the benefit of making the stats
> imprecise (not that it matters to iotop)?

I think the question should be: why is it *ever* a good idea to let
*anybody* read how many bytes anybody has read.

If you want that kind of detail, do "strace". Don't do that abortion
that is taskstats.

> - byte level stats only if ptrace_may_access() though iotop can
> certainly live with 1k rounded values

Again, do a real trace.

Right now, TASKSTATS is a total and utter disaster. I want to make it
*less* used, not more. And I sure as hell don't want to make it even
*more* of a burden on the kernel by having to do the whole ptrace
check on each and every task.

Seriously. TASKSTATS is crap. It should die. I was *this* close to
deciding to just rip it out entirely. The whole thing is badly
designed, it's known-broken wrt namespaces, and it's a crazy idea to
begin with.

Castrating it a bit and limiting it to root-only made it just
palatable enough that I felt it didn't need to be removed entirely.

But if it gets annoying enough and people try to extend it to be even
more complicated, my response to that will just be "No. HELL NO!".

Especially since I haven't heard a peep about the fact that it was
totally broken wrt namespaces despite reporting it to the people who
were ostensibly in charge of it..

No new complications. People should work at fixing the mess that it
is, rather than trying to make it even messier.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at