Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/dev/usb
On Wed, Nov 26, 2025 at 03:12:42AM +0000, Taylor R Campbell wrote:
> I appreciate that it is frustrating to find that the lock may be held
> by a thread that isn't running because ddb has suspended all the other
> CPUs and the scheduler. But just skipping the mutex_enter can't fix
> that.
This change just follows what is done elsewhere in the USB stack:
if polling, then skip locks.
I agree with you that this blends two different situations:
- userconf and boot -a
- DDB
In the userconf and boot -a case, nothing prevents us to use
locks, and we should probably do it.
In the DDB case, in my opinion things are different. This is
a last chance situation, we should try to perform I/O even
when we interrupted some critical code in panic. Perhaps we
will not survive the I/O, but it is still better than give
up because odds are not good.
Hence in my opinion we could try to replace the various
"if (polling) then skip locks" by "if (db_active) then skip locks.
--
Emmanuel Dreyfus
manu%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index