linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hubertus Franke <frankeh@watson.ibm.com>
To: Joel Becker <jlbec@evilplan.org>
Cc: Joel Becker <jlbec@evilplan.org>,
	Rusty Russell <rusty@rustcorp.com.au>,
	matthew@hairy.beasts.org, linux-kernel@vger.kernel.org,
	lse-tech@lists.sourceforge.net
Subject: Re: [PATCH] Re: futex and timeouts
Date: Fri, 15 Mar 2002 13:59:38 -0500	[thread overview]
Message-ID: <20020315185844.8883E3FE06@smtp.linux.ibm.com> (raw)
In-Reply-To: <20020314151846.EDCBF3FE07@smtp.linux.ibm.com> <20020315151507.2370C3FE0C@smtp.linux.ibm.com> <20020315160444.P4836@parcelfarce.linux.theplanet.co.uk>
In-Reply-To: <20020315160444.P4836@parcelfarce.linux.theplanet.co.uk>

On Friday 15 March 2002 11:04 am, Joel Becker wrote:
> On Fri, Mar 15, 2002 at 10:16:02AM -0500, Hubertus Franke wrote:
> > > 	Why waste a syscall?  The user is going to be using a library
> > > wrapper.  They don't have to know that futex_up() calls
> > > sys_futex(futex, FUTEX_UP, NULL);
> >
> > I agree with that, only for the reason that we are getting scarce on
> > syscall nubmers. Is 256-delta the max ?
>
> 	This was my impression, and why I called it "wasting" a syscall.
> On architectures where syscall numbers or handles are unlimited, of
> course there is no reason to keep it to one syscall.
>
> > One thing to consider is that many don't want to use libraries.
> > They want to inline, which would result only in a few instruction.
>
> 	Inlined you only take the penalty from the argument pushes.  You
> still have to go through the motions of checking whether you can
> get/release the lock in userspace.
>
> > What I would like to see is an interface that lets me pass optional
> > parameters to the syscall interface, so I can call with different number
> > of parameters.
>
> 	Is this to lock multiple futexes "atomically"?  If we are
> looking for a fast path stack-wise, this seems extra work.
>
> Joel

No, take for example...

syscall3(int,futex,int,op, struct futex*, futex, int opt_arg);

I will be always forced by the compiler (-Wall) to supply 3 arguments even 
as in the case of "no time out desired" I have to push a 3rd meaningless 
optional argument on the stack.


-- 
-- Hubertus Franke  (frankeh@watson.ibm.com)

  reply	other threads:[~2002-03-15 18:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-13 18:26 futex and timeouts Hubertus Franke
2002-03-13 18:54 ` Ulrich Drepper
2002-03-14  4:15 ` Rusty Russell
2002-03-14 15:19   ` Hubertus Franke
2002-03-15  5:39     ` [PATCH] " Rusty Russell
2002-03-15  6:08       ` Joel Becker
2002-03-15  6:56         ` H. Peter Anvin
2002-03-15  8:49         ` Rusty Russell
2002-03-15 15:16         ` Hubertus Franke
2002-03-15 16:04           ` Joel Becker
2002-03-15 18:59             ` Hubertus Franke [this message]
2002-03-15 19:28               ` Joel Becker
2002-03-16  1:12                 ` [Lse-tech] " george anzinger
2002-03-18 21:35                   ` Hubertus Franke

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=20020315185844.8883E3FE06@smtp.linux.ibm.com \
    --to=frankeh@watson.ibm.com \
    --cc=jlbec@evilplan.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lse-tech@lists.sourceforge.net \
    --cc=matthew@hairy.beasts.org \
    --cc=rusty@rustcorp.com.au \
    /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;
as well as URLs for NNTP newsgroup(s).