All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Kyle McMartin <kyle@mcmartin.ca>
Cc: Andrew Morton <akpm@osdl.org>, parisc-linux@lists.parisc-linux.org
Subject: Re: [parisc-linux] Re: + parisc-add-ptr-compatpatch.patch added to -mm tree
Date: Sun, 9 Apr 2006 07:37:17 +0200	[thread overview]
Message-ID: <20060409053716.GA18611@elte.hu> (raw)
In-Reply-To: <20060409001100.GD30539@quicksilver.road.mcmartin.ca>


* Kyle McMartin <kyle@mcmartin.ca> wrote:

> [Sorry about how long it has taken to get to this... I bounced it to
>  parisc-linux too, so hopefully someone else can comment as well.]
> 
> On Wed, Feb 22, 2006 at 10:13:56AM +0100, Ingo Molnar wrote:
> > There's only one complication i can imagine on PARISC: truly atomic 
> > futex_atomic_cmpxchg_inuser() is not possible in any sane way because 
> > any spinlock based cmpxchg exposes itself to userspace locking up the 
> > kernel - no good. [We could in theory do something about it by imposing 
> > some sort of deadline on the maximum time the spinning-on-userspace-lock 
> > can take - but i dont think it's worth the trouble.]
> >
> 
> Due to a complete lack of useful atomic operations on parisc, the way 
> I envisioned implementing the routines was serializing all futex ops 
> on a kernel spinlock. Since it's a userspace address, we couldn't use 
> an atomic hash unless we found the physical address behind it, so just 
> one spinlock would do... Of course, I'm probably missing something 
> critical here, though.

if userspace doesnt do atomic ops then the solution should be relatively 
easy: make glibc always call into the kernel, and then the kernel-level 
futex.h ops can be implemented in a lockless manner (i.e. not even a 
spinlock is needed) and you'll get (pretty scalable) futex 
functionality. The in-kernel futex hash-bucket spinlocks take care of 
locking.

	Ingo
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

  reply	other threads:[~2006-04-09  5:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200602220102.k1M12Jje015527@shell0.pdx.osdl.net>
     [not found] ` <20060222010459.GE26809@quicksilver.road.mcmartin.ca>
     [not found]   ` <20060221172126.2db4adef.akpm@osdl.org>
     [not found]     ` <20060222091356.GA27449@elte.hu>
2006-04-09  0:11       ` [parisc-linux] Re: + parisc-add-ptr-compatpatch.patch added to -mm tree Kyle McMartin
2006-04-09  5:37         ` Ingo Molnar [this message]
2006-04-09 14:09           ` Carlos O'Donell

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=20060409053716.GA18611@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@osdl.org \
    --cc=kyle@mcmartin.ca \
    --cc=parisc-linux@lists.parisc-linux.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.