All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Ulrich Drepper <drepper@redhat.com>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	mingo@elte.hu, tglx@linutronix.de, torvalds@linux-foundation.org
Subject: Re: [PATCHv3 0/4] sys_indirect system call
Date: Sun, 18 Nov 2007 11:37:40 -0800	[thread overview]
Message-ID: <47409484.8040304@zytor.com> (raw)
In-Reply-To: <474007B3.30205@redhat.com>

Ulrich Drepper wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> H. Peter Anvin wrote:
>> It seems to me that we could accomplish the same thing by passing the
>> number of parameters in the upper bits of the system call number
>> register (%eax in the case of x86.)
> 
> This isn't really a generic solution.  The number of parameters is
> limited to six.  There are syscalls with six parameters already.  There
> are many more with five which could only handle one more parameter.
> 
> Also, is it really simpler?  You'd need to have another table which
> contains the default number of parameters a system call takes so that
> you can fill in the default value of zero.  This extra memory access has
> to be performed for every system call.
> 
> I think it is unlikely that this approach is faster.  To the contrary,
> I'd guess.
> 
> I don't have much invested into this but it seems the sys_indirect
> approach is so much simpler.  Overhead is only paid if you really need
> it which is rarely the case.  Plus, you might have heard Linus and Zack
> talk about syslets again.  Starting syslets can be done using the same
> interface, I guess.
> 

What bothers me about the sys_indirect approach is that it will get 
increasingly expensive as time goes on, and in doing so it does a 
user-space memory reference, which are extra expensive.  The extra table 
can be colocated with the main table (a structure, in effect) so they'll 
share the same cache line.

	-hpa

  reply	other threads:[~2007-11-18 19:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-17  5:31 [PATCHv3 0/4] sys_indirect system call Ulrich Drepper
2007-11-18  7:44 ` H. Peter Anvin
2007-11-18  9:36   ` Ulrich Drepper
2007-11-18 19:37     ` H. Peter Anvin [this message]
2007-11-20  3:28       ` Ulrich Drepper
2007-11-20  4:27         ` H. Peter Anvin
2007-11-19 13:52 ` Eric Dumazet
2007-11-19 15:12   ` Ulrich Drepper
2007-11-19 15:43     ` Eric Dumazet
2007-11-19 15:48       ` Ulrich Drepper
2007-11-19 16:14         ` Eric Dumazet
2007-11-19 19:08           ` Ingo Molnar
2007-11-20 14:11             ` dean gaudet
2007-11-20 16:16               ` Ulrich Drepper

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=47409484.8040304@zytor.com \
    --to=hpa@zytor.com \
    --cc=akpm@linux-foundation.org \
    --cc=drepper@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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.