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

Daniel Phillips
2001-11-05T00:10:02Z

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