Re: [patch] reduce IPI noise due to /dev/cdrom open/close

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 04, 2006 at 10:12:49AM +0200, Jes Sorensen wrote:
> Arjan van de Ven wrote:
> > On Tue, 2006-07-04 at 09:47 +0200, Jes Sorensen wrote:
> >> Well yes and no. $#@$#@* hald will do the open/close stupidity a
> >> couple of times per second. On a 128 CPU system thats quite a lot of
> >> IPI traffic, resulting in measurable noise if you run a benchmark.
> >> Remember that the IPIs are synchronous so you have to wait for them to
> >> hit across the system :
> > 
> > can you get hald fixed? That sounds important anyway... stupid userspace
> > isn't going to be good no matter what, and the question is how much crap
> > we need to do in the kernel to compensate for stupid userspace...
> > especially if such userspace is open source and CAN be fixed...
> 
> I'd like to, I don't know how feasible it is though :( The distros make
> it a priority to run all the GUI stuff that makes Linux look like
> windows as much as they can, which includes autodetecting when users
> insert their latest audio CD so they can launch the mp3 ripper
> automatically ....
> 
> Guess the question is, is there a way we can detect when media has been
> inserted without doing open/close on the device constantly? It's not
> something I have looked at in detail, so I dunno if there's a sensible
> way to handle it.

I always believed that it was possible, but not on all cdroms.
If this was supported, people with lots of cpus could be told to
get some of the sane cdroms for their big boxes.

One solution is to have the kernel do this kind of polling itself,
in the device drivers for removeable media.
Then it can simply notify userspace when something happens,
and userspace can decide to play music, mount a fs, or whatever
people want to happen.

> 
> The other part of it is that I do think it's undesirable that a user
> space app can cause so much kernel IPI noise by simply doing open/close
> on a device.

Sure, a DOS waiting to happen.  If they can poll twice a second, whats
to stop them from trying to poll a hundred times a second, or in
a busy loop?

Helge Hafting
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux