mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Kacur <jkacur@redhat.com>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org, Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Arnd Bergmann <arndbergmann@googlemail.com>,
	Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH RFC] PPC-BRIQ_PANEL: Remove BKL and replace with atomic variable.
Date: Tue, 20 Oct 2009 09:46:12 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.2.00.0910200938230.3609@localhost.localdomain> (raw)
In-Reply-To: <20091019220129.GE4880@nowhere>



On Tue, 20 Oct 2009, Frederic Weisbecker wrote:

> On Mon, Oct 19, 2009 at 07:04:02AM +0200, Thomas Gleixner wrote:
> > B1;2005;0cOn Sun, 18 Oct 2009, John Kacur wrote:
> > 
> > > >From b64c7d0f11eab96cb253b23c7264c999746116c0 Mon Sep 17 00:00:00 2001
> > > From: John Kacur <jkacur@redhat.com>
> > > Date: Sun, 18 Oct 2009 21:29:21 +0200
> > > Subject: [PATCH] PPC-BRIQ_PANEL: Remove BKL and replace with atomic variable.
> > > 
> > > There are no locks here except the bkl in briq_panel_open. It's only
> > > purpose is to ensure single access. Remove the bkl and ensure single access
> > > by making vfd_is_open an atomic_variable.
> > 
> > And again, can you please look more carefully at the init
> > vs. read/write functions ?
> > 
> > The BKL is not only protecting the single user variable it's also
> > serializing write against the access to the display in init.
> > 
> > Thanks,
> > 
> > 	tglx
> 
> 
> That could be solved by statically initializing vfd_is_open to -1
> and then set it to 0 once briq_panel_init has finished initializing
> the device.

Well, I did think of a similar scheme, but in another chat or email, 
(don't remember which) Thomas told me that any such synchronization is a 
hack, the only correct thing to do is fix the init.
His point being, either the device is available to functions like read or 
write or it isn't. However, that sync technique seems so simple here, I 
may not give up on it.
 > 

      reply	other threads:[~2009-10-20  7:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-18 19:39 John Kacur
2009-10-19  5:04 ` Thomas Gleixner
2009-10-19 22:01   ` Frederic Weisbecker
2009-10-20  7:46     ` John Kacur [this message]

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=alpine.LFD.2.00.0910200938230.3609@localhost.localdomain \
    --to=jkacur@redhat.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=arndbergmann@googlemail.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®