skipping locks, mutex_owned, usb

Andriy Gapon avg at FreeBSD.org
Mon Aug 29 13:19:35 UTC 2011


on 25/08/2011 14:52 Hans Petter Selasky said the following:
>> http://people.freebsd.org/~avg/stop_scheduler_on_panic.diff
>> http://people.freebsd.org/~avg/stop_scheduler_on_panic.8.x.diff
> 
> The following patch complements Andriy's patch with regard to USB. Please test 
> and report back!
> 
> http://hselasky.homeunix.org:8192/usb_scheduler_stopped.patch

Here is my take on the issue:
http://people.freebsd.org/~avg/ukbd-polling.diff
Admittedly it has a few hairy places, but overall it should reduce the number of
lines and quirks in the ukbd code.
The patch can be logically separated into three parts:
- locking Giant around kbdd_poll and scgetc calls in sc_cngetc
- SCHEDULER_STOPPED-vs-mutex_owned changes in usb_transfer.c
- removing explicit Giant checks and manipulations in ukbd.c

I would like to ask for a review of these changes in whole or in parts.
Thank you!

Further, I think that ideally we should follow bde's suggestion of extending
syscons interface to allow explicitly going into and out of the polling mode
instead of implicitly doing that for every character.
Also, perhaps kernel doesn't always have to use the polling mode - for example I
think that the mountroot prompt should do fine in the regular mode.

-- 
Andriy Gapon


More information about the freebsd-arch mailing list