public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
To: "Luck, Tony" <tony.luck-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Matthew Wilcox <matthew-Ztpu424NOJ8@public.gmane.org>,
	Nick Piggin <nickpiggin-/E1597aS9LT0CCvOHzKKcA@public.gmane.org>,
	Stephen Rothwell <sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>,
	linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: down_spin() implementation
Date: Sat, 29 Mar 2008 00:48:21 +0100	[thread overview]
Message-ID: <200803290048.22931.arnd@arndb.de> (raw)
In-Reply-To: <1FE6DD409037234FAB833C420AA843ECF237C0-7XlYjKTK0pM64kNsxIetb7fspsVTdybXVpNB7YpNyf8@public.gmane.org>

On Friday 28 March 2008, Luck, Tony wrote:
> > So it makes little sense to add this to semaphores.  Better to introduce
> > a spinaphore, as you say.
> 
> > struct {
> >   atomic_t cur;
> >   int max;
> > } ss_t;
> 
> Could this API sneak into the bottom of one or the other of
> linux/include/{spinlock,semaphore}.h ... or should it get its own
> spinaphore.h file?
>
> Or should I follow Alan's earlier advice and keep this as an ia64
> only thing (since I'll be the only user).

If you use the simple version suggested last by Willy, I think it
could even be open-coded in your TLB management code.

Should we decided to make it an official interface, I'd suggest
putting it into atomic.h, because it operates on a plain atomic_t.

	Arnd <><

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: Matthew Wilcox <matthew@wil.cx>,
	Nick Piggin <nickpiggin@yahoo.com.au>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	linux-arch@vger.kernel.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: down_spin() implementation
Date: Sat, 29 Mar 2008 00:48:21 +0100	[thread overview]
Message-ID: <200803290048.22931.arnd@arndb.de> (raw)
Message-ID: <20080328234821.cbXeIaSm320IxFP7AHo-jUawY5qYHxjV3cM9SUeiD18@z> (raw)
In-Reply-To: <1FE6DD409037234FAB833C420AA843ECF237C0@orsmsx424.amr.corp.intel.com>

On Friday 28 March 2008, Luck, Tony wrote:
> > So it makes little sense to add this to semaphores.  Better to introduce
> > a spinaphore, as you say.
> 
> > struct {
> >   atomic_t cur;
> >   int max;
> > } ss_t;
> 
> Could this API sneak into the bottom of one or the other of
> linux/include/{spinlock,semaphore}.h ... or should it get its own
> spinaphore.h file?
>
> Or should I follow Alan's earlier advice and keep this as an ia64
> only thing (since I'll be the only user).

If you use the simple version suggested last by Willy, I think it
could even be open-coded in your TLB management code.

Should we decided to make it an official interface, I'd suggest
putting it into atomic.h, because it operates on a plain atomic_t.

	Arnd <><

  parent reply	other threads:[~2008-03-28 23:48 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-25 20:49 What if a TLB flush needed to sleep? Luck, Tony
2008-03-25 20:49 ` Luck, Tony
     [not found] ` <1FE6DD409037234FAB833C420AA843ECE9DF60-7XlYjKTK0pM64kNsxIetb7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2008-03-25 21:47   ` Alan Cox
2008-03-25 21:47     ` Alan Cox
2008-03-26 12:32   ` Matthew Wilcox
2008-03-26 12:32     ` Matthew Wilcox
     [not found]     ` <20080326123239.GG16721-6jwH94ZQLHl74goWV3ctuw@public.gmane.org>
2008-03-26 20:29       ` Luck, Tony
2008-03-26 20:29         ` Luck, Tony
     [not found]         ` <1FE6DD409037234FAB833C420AA843ECE9EB1C-7XlYjKTK0pM64kNsxIetb7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2008-03-27  8:09           ` Jens Axboe
2008-03-27  8:09             ` Jens Axboe
2008-03-27 14:15           ` down_spin() implementation Matthew Wilcox
2008-03-27 14:15             ` Matthew Wilcox
     [not found]             ` <20080327141508.GL16721-6jwH94ZQLHl74goWV3ctuw@public.gmane.org>
2008-03-28  0:01               ` Nick Piggin
2008-03-28  0:01                 ` Nick Piggin
     [not found]                 ` <200803281101.25037.nickpiggin-/E1597aS9LT0CCvOHzKKcA@public.gmane.org>
2008-03-28 12:45                   ` Matthew Wilcox
2008-03-28 12:45                     ` Matthew Wilcox
     [not found]                     ` <20080328124517.GQ16721-6jwH94ZQLHl74goWV3ctuw@public.gmane.org>
2008-03-28 21:16                       ` Luck, Tony
2008-03-28 21:16                         ` Luck, Tony
     [not found]                         ` <1FE6DD409037234FAB833C420AA843ECF237C0-7XlYjKTK0pM64kNsxIetb7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2008-03-28 23:48                           ` Arnd Bergmann [this message]
2008-03-28 23:48                             ` Arnd Bergmann
2008-03-29  1:04                       ` Nick Piggin
2008-03-29  1:04                         ` Nick Piggin
2008-03-28  4:51               ` Stephen Rothwell
2008-03-28  4:51                 ` Stephen Rothwell
     [not found]                 ` <20080328155107.e9d8866c.sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
2008-03-28  5:03                   ` Nick Piggin
2008-03-28  5:03                     ` Nick Piggin
     [not found]                     ` <200803281603.34134.nickpiggin-/E1597aS9LT0CCvOHzKKcA@public.gmane.org>
2008-03-28 12:46                       ` Matthew Wilcox
2008-03-28 12:46                         ` Matthew Wilcox
2008-03-28 12:51               ` Jens Axboe
2008-03-28 12:51                 ` Jens Axboe
     [not found]                 ` <20080328125104.GK12346-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org>
2008-03-28 13:17                   ` Matthew Wilcox
2008-03-28 13:17                     ` Matthew Wilcox
     [not found]                     ` <20080328131750.GT16721-6jwH94ZQLHl74goWV3ctuw@public.gmane.org>
2008-03-28 13:24                       ` Jens Axboe
2008-03-28 13:24                         ` Jens Axboe
2008-03-26 19:25   ` What if a TLB flush needed to sleep? Christoph Lameter
2008-03-26 19:25     ` Christoph Lameter
     [not found]     ` <Pine.LNX.4.64.0803261222090.31000-RYO/mD75kfhx2SFC9UQUAuF7EQX82lMiAL8bYrjMMd8@public.gmane.org>
2008-03-26 20:29       ` Thomas Gleixner
2008-03-26 20:29         ` Thomas Gleixner
     [not found]         ` <alpine.LFD.1.00.0803262121440.3781-dbfLifZv8x0yMciVaGeJ0d53zsg1cpMQ@public.gmane.org>
2008-03-27  1:19           ` Christoph Lameter
2008-03-27  1:19             ` Christoph Lameter
     [not found]             ` <Pine.LNX.4.64.0803261817110.1115-RYO/mD75kfhx2SFC9UQUAuF7EQX82lMiAL8bYrjMMd8@public.gmane.org>
2008-03-27 13:20               ` Peter Zijlstra
2008-03-27 13:20                 ` Peter Zijlstra
2008-03-27 18:44                 ` Christoph Lameter
2008-03-27 18:44                   ` Christoph Lameter
     [not found]                   ` <Pine.LNX.4.64.0803271143540.7531-RYO/mD75kfhx2SFC9UQUAuF7EQX82lMiAL8bYrjMMd8@public.gmane.org>
2008-03-28  9:59                     ` Peter Zijlstra
2008-03-28  9:59                       ` Peter Zijlstra

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=200803290048.22931.arnd@arndb.de \
    --to=arnd-r2ngtmty4d4@public.gmane.org \
    --cc=linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org \
    --cc=matthew-Ztpu424NOJ8@public.gmane.org \
    --cc=nickpiggin-/E1597aS9LT0CCvOHzKKcA@public.gmane.org \
    --cc=sfr-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org \
    --cc=tony.luck-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox