All of lore.kernel.org
 help / color / mirror / Atom feed
From: george anzinger <george@mvista.com>
To: "David C. Hansen" <dave@sr71.net>
Cc: Alexander Viro <viro@math.psu.edu>,
	linux-kernel@vger.kernel.org,
	Linus Torvalds <torvalds@transmeta.com>
Subject: Re: [LART] pc_keyb.c changes
Date: Fri, 30 Nov 2001 17:04:58 -0800	[thread overview]
Message-ID: <3C082CBA.B66BF30F@mvista.com> (raw)
In-Reply-To: <Pine.GSO.4.21.0111300252030.13367-100000@weyl.math.psu.edu> <3C07FB73.9030708@sr71.net>

"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/

  reply	other threads:[~2001-12-01  1:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-30  8:25 [LART] pc_keyb.c changes Alexander Viro
2001-11-30  9:04 ` Alexander Viro
2001-11-30 21:34 ` David C. Hansen
2001-12-01  1:04   ` george anzinger [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-12-01  2:05 David C. Hansen
2001-12-01  9:56 ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3C082CBA.B66BF30F@mvista.com \
    --to=george@mvista.com \
    --cc=dave@sr71.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    --cc=viro@math.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.