All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: David Miller <davem@davemloft.net>
Cc: eric.lemoine@gmail.com, netdev@vger.kernel.org
Subject: Re: [patch sungem] improved locking
Date: Wed, 29 Nov 2006 09:57:24 +1100	[thread overview]
Message-ID: <1164754644.5350.110.camel@localhost.localdomain> (raw)
In-Reply-To: <20061128.144911.55733883.davem@davemloft.net>


> This looks mostly fine.
> 
> I was thinking about the lockless stuff, and I wonder if there
> is a clever way you can get it back down to one PIO on the
> GREG_STAT register.
> 
> I think you'd need to have the ->poll() clear gp->status, then
> do a smp_wb(), right before it re-enables interrupts.
> 
> Then in the interrupt handler, you need to find a way to safely
> OR-in any unset bits in gp->status in a race-free manner.

Having it atomic might work at a slightly smaller cost than a lock,
though atomics don't have strong ordering requirements so you'd still
have to be a bit careful.

Ben.



  reply	other threads:[~2006-11-28 22:57 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-09 21:33 [patch sungem] improved locking Eric Lemoine
2006-11-09 23:04 ` David Miller
2006-11-10 13:28   ` Eric Lemoine
2006-11-10 20:37     ` Benjamin Herrenschmidt
2006-11-10 20:42     ` David Miller
2006-11-12 23:11       ` Eric Lemoine
2006-11-14  0:46         ` David Miller
2006-11-14  7:28           ` Eric Lemoine
2006-11-14  7:44             ` David Miller
2006-11-14 21:54               ` Eric Lemoine
2006-11-28 22:49                 ` David Miller
2006-11-28 22:57                   ` Benjamin Herrenschmidt [this message]
2006-11-28 23:43                     ` David Miller
2006-11-29  0:19                       ` Benjamin Herrenschmidt
2006-11-29 10:16                       ` Eric Lemoine
2006-11-29 10:56                   ` Eric Lemoine
2006-11-29 22:37                     ` Eric Lemoine
2006-12-13  3:12                       ` Benjamin Herrenschmidt
2006-12-13  3:24                         ` Benjamin Herrenschmidt
2006-12-13  4:03                         ` David Miller
2006-12-13  4:07                           ` Benjamin Herrenschmidt
2006-12-29  5:05                             ` David Miller
2006-12-29 21:36                               ` Benjamin Herrenschmidt
2006-12-29 23:20                                 ` David Miller
2006-12-12  1:43                     ` David Miller
2006-12-12  5:33                       ` Eric Lemoine
2006-12-12  5:36                         ` Benjamin Herrenschmidt
2006-12-12  5:49                           ` Eric Lemoine
2006-12-15  0:59                             ` Benjamin Herrenschmidt
2006-12-18  1:15                               ` David Miller
2006-12-18  1:41                                 ` Benjamin Herrenschmidt

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=1164754644.5350.110.camel@localhost.localdomain \
    --to=benh@kernel.crashing.org \
    --cc=davem@davemloft.net \
    --cc=eric.lemoine@gmail.com \
    --cc=netdev@vger.kernel.org \
    /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.