Re: Ingo's realtime_preempt patch causes kernel oops

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

 



On Wed, 2006-05-24 at 19:06 +0200, Thomas Gleixner wrote:
> On Wed, 2006-05-24 at 18:43 +0200, Esben Nielsen wrote:
> > I am working on patchset dealing with this problem. It still needs clean
> > up. The basic idea is to add a SA_MUSTTHREAD along with SA_NODELAY. Under
> > PREEMPT_RT all interrupthandlers, which doesn't have SA_NODELAY, will get
> > SA_MUSTTHREAD unless the driver is changed. In irq_request() it is checked
> > if the handler has SA_NODELAY and an old has SA_MUSTTHREAD and visa
> > versa.
> > 
> > I have also made a lock type which can be changed from rt_mutex to
> > raw_spin_lock runtime. And I have made a system with a call-back from the
> > irq-layer to the driver so they can change their spinlocks on the fly when
> > needed.
> 
> That sounds scary. 
> 

> If you want your handler to be SA_NODELAY then you did this for a
> reason. Simply refuse to share if the other device requests the
> interrupt without SA_NODELAY.
> 

This is apparently difficult with COTS hardware in some cases.

> A real solution for that problem needs more thought and the only thing
> which comes to my mind is to have split handler functionality, which
> allows to implement real cascaded interrupts. The short first stub would
> just query, mask/ack the interrupt in the device and return the
> appropriate information, so the real handler can be invoked at any given
> time.
> 
> I know it would be a large pile of hacking, but it would be a clean
> solution. OTOH it might be done gradually on a per driver base once the
> basic infrastucture is in place.
> 

The problem with the per-driver approach to porting, is that this is
only possible if you have a limited (known) number of devices in your
system.

There is code which promotes any IRQ shared with SA_NODELAY to
SA_NODELAY, and at least on PCI, that is where you get cascading
collisions between the drivers that have been adapted with the ones that
have not. 

Sven

> 	tglx
> 
> 
> -
> 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/
-- 
***********************************
Sven-Thorsten Dietrich
Real-Time Software Architect
MontaVista Software, Inc.
2901 Patrick Henry Drive, Suite 150
Santa Clara, CA 95054-1831 
 
Direct: 408.572.7870
Main: 408.572.8000
Fax: 408.572.8005

www.mvista.com
Platform To Innovate
*********************************** 

-
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