lkml.org 
[lkml]   [2001]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [LART] pc_keyb.c changes
"David C. Hansen" wrote:
>
> Alexander Viro wrote:
>
> > Could the person who switched from BKL to spin_lock_irqsave() in
> > pc_keyb.c please share whatever the hell he had been smoking? Free clue:
> > disabling interrupts for long intervals to improve scalability is right up
> > there with fighting for peace and fucking for virginity.
> As I slowly raise my hand to take, um credit....
>
> This is definitely one of the drivers I to take a second look at, now
> that I know about the BKL being held for block and char device opens.
> Do you have any ideas how else to do this safely since aux_count is
> referenced during an interrupt?
>
Um, staying as far away from that bit of source as possible, I will
offer:

It depends on how it is referenced. If it is just a counter, you may be
able to just make it atomic. If it needs to "stick" for a little
longer, then consider if there are many readers and only a few writers,
in which case look at the read/write_lockirq code, however, this does
have the down side of irq off. BKL did not protect against interrupts,
so one wonders if the irq bit is needed at all.
--
George george@mvista.com
High-res-timers: http://sourceforge.net/projects/high-res-timers/
Real time sched: http://sourceforge.net/projects/rtsched/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:13    [W:0.048 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site