tech-kern archive

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

Re: mutexes, IPL, tty locking



> alldevs_mtx will synchronize access to alldevs by both threads and
> interrupts, especially interrupts indicating device disconnection
> (unplugging FireWire/CardBus/PCMCIA/USB) or bus exceptions (PCI aborts),
> which I want to handle at a high priority.

Even if handling those exeptions in the IPL_HIGH interrupt context, you can't
avoid all the inconsistencies in drivers.  What if one thread is about to
access PCI.  Unplug interrupt happens, you execute detach process in IPL_HIGH
interrupt.  Now back to the original thread, it just accesses PCI and you
lose...

In other words, the above situation is not an excuse to make alldevs_mtx
protected with IPL_HIGH.  I think IPL_NONE is just fine.

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Home | Main Index | Thread Index | Old Index