Re: PROPOSAL: dot-proc interface [was: /proc stuff]

Daniel Phillips (phillips@bonn-fries.net)
Mon, 5 Nov 2001 01:10:19 +0100


On November 5, 2001 12:42 am, Alexander Viro wrote:
> On Sun, 4 Nov 2001, Daniel Phillips wrote:
>
> > Doing 'top -d .1' eats 18% of a 1GHz cpu, which is abominable. A kernel
> > profile courtesy of sgi's kernprof shows that scanning pages does not move
> > the needle, whereas sprintf does. Notice that the biggest chunk of time
>
> Huh? Scanning pages is statm_pgd_range(). I'd say that it takes
> seriously more than vsnprintf() - look at your own results.

Yes, true, 2.6 seconds for the statm_pgd_range vs 1.2 for sprintf. Still,
sprintf is definitely burning cycles, pretty much the whole 1.2 seconds would
be recovered with a binary interface.

Now look at the total time we spend in the kernel: 10.4 seconds, 4 times the
page scanning overhead. This is really wasteful.

For top does it really matter? (yes, think slow computer) What happens when
proc stabilizes and applications start relying on it heavily as a kernel
interface? If we're still turning in this kind of stunningly poor
performance, it won't be nice.

It's not that it doesn't work, it's just that it isn't the best.

--
Daniel
-
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/