All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Kleikamp <dave.kleikamp@oracle.com>
To: sparclinux@vger.kernel.org
Subject: Re: [PATCH] sparc64: Don't pass a pointer to xcall_flush_tlb_pending
Date: Wed, 17 Apr 2013 22:07:26 +0000	[thread overview]
Message-ID: <516F1D1E.5020307@oracle.com> (raw)
In-Reply-To: <516F0B8A.5070407@oracle.com>

On 04/17/2013 04:31 PM, David Miller wrote:
> 
> I also don't agree with this approach to fix the bug.

I'm not wild about it myself, but it's relatively simple and fixes the
problem.

> I'd much rather we properly synchronize.  One idea is to have
> a pendulum which sways every time a remove batch flush is
> performed.
> 
> The pendulum is a pointer, which points to one of two per-cpu batch
> datastructures.  A remote flush is issued by setting an atomic counter
> to the number of remote cpus doing the flush in the per-cpu batch
> area, each remote cpu decrements the atomic counter.

The remote function doesn't operate with a stack, so it can't simply
call atomic_dec (or atomic_sub) but would need to open code it.
Possible, but it makes the fix a bit more complicated.

> The submitter also "sways the pendulum" by adjusting the pointer to
> other per-cpu batch datastructure.
> 
> If a submitter sees that there is a reference count on the per-cpu
> batch the pendulum points to, it waits until the counter hits zero.

  parent reply	other threads:[~2013-04-17 22:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-17 20:52 [PATCH] sparc64: Don't pass a pointer to xcall_flush_tlb_pending Dave Kleikamp
2013-04-17 21:24 ` David Miller
2013-04-17 21:31 ` David Miller
2013-04-17 22:07 ` Dave Kleikamp [this message]
2013-04-17 22:44 ` David Miller
2013-04-19  0:51 ` David Miller
2013-04-19 14:46 ` Dave Kleikamp
2013-04-19 17:40 ` Dave Kleikamp
2013-04-19 17:41 ` David Miller
2013-04-19 18:03 ` Dave Kleikamp
2013-04-19 18:11 ` David Miller

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=516F1D1E.5020307@oracle.com \
    --to=dave.kleikamp@oracle.com \
    --cc=sparclinux@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.