Re: Scheduler ( was: Just a second ) ...

From: Peter Wächtler (pwaechtler@loewe-komp.de)
Date: Wed Dec 19 2001 - 04:19:22 EST


Doug Ledford schrieb:
>
> Andreas Dilger wrote:
>
> > On Dec 18, 2001 09:27 -0800, Linus Torvalds wrote:
> >
> >>Maybe the best thing to do is to educate the people who write the sound
> >>apps for Linux (somebody was complaining about "esd" triggering this, for
> >>example).
> >>
> >
> > Yes, esd is an interrupt hog, it seems. When reading this thread, I
> > checked, and sure enough I was getting 190 interrupts/sec on the
> > sound card while not playing any sound. I killed esd (which I don't
> > use anyways), and interrupts went to 0/sec when not playing sound.
> > Still at 190/sec when using mpg123 on my ymfpci (Yamaha YMF744B DS-1S)
> > sound card.
>
> Weel, evidently esd and artsd both do this (well, I assume esd does now, it
> didn't do this in the past). Basically, they both transmit silence over the
> sound chip when nothing else is going on. So even though you don't hear
> anything, the same sound output DMA is taking place. That avoids things
> like nasty pops when you start up the sound hardware for a beep and that
> sort of thing. It also maintains state where as dropping output entirely
> could result in things like module auto unloading and then reloading on the
> next beep, etc. Personally, the interrupt count and overhead annoyed me
> enough that when I started hacking on the i810 sound driver one of my
> primary goals was to get overhead and interrupt count down. I think I
> suceeded quite well. On my current workstation:
>
> Context switches per second not playing any sound: 8300 - 8800
> Context switches per second playing an MP3: 9200 - 9900
> Interrupts per second from sound device: 86
> %CPU used when not playing MP3: 0 - 3% (magicdev is a CPU pig once every 2
> seconds)
> %CPU used when playing MP3s: 0 - 4%
>
> In any case, it might be worth the original poster's time in figuring out
> just how much of his lost CPU is because of playing sound and how much is
> actually caused by the windowing system and all the associated bloat that
> comes with it now a days.
>

Do you really think 8000 context switches are sane?

pippin:/var/log # vmstat 1
   procs memory swap io system cpu
 r b w swpd free buff cache si so bi bo in cs us sy id
 2 0 0 100728 4424 121572 27800 0 1 6 6 61 77 98 2 0
 2 0 0 100728 5448 121572 27800 0 0 0 68 112 811 93 7 0
 2 0 0 100728 5448 121572 27800 0 0 0 0 101 776 95 5 0
 3 0 0 100728 4928 121572 27800 0 0 0 0 101 794 92 8 0

having a load ~2.1 (2 seti@home)
-
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/



This archive was generated by hypermail 2b29 : Sun Dec 23 2001 - 21:00:18 EST