[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <47409484.8040304@zytor.com>
Date: Sun, 18 Nov 2007 11:37:40 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: Ulrich Drepper <drepper@...hat.com>
CC: linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
mingo@...e.hu, tglx@...utronix.de, torvalds@...ux-foundation.org
Subject: Re: [PATCHv3 0/4] sys_indirect system call
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists