On Mon, Jan 17, 2000 at 11:05:33PM -0800, H. Peter Anvin wrote:
> Keith Owens wrote:
> >
> > On 17 Jan 2000 20:50:54 -0800,
> > hpa@transmeta.com (H. Peter Anvin) wrote:
> > >By author: Keith Owens <kaos@ocs.com.au>
> > >> Please do not change the kernel to add _syscall_pic code, it is
> > >> unnecessary bloat. It is a userspace problem which needs a userspace
> > >> solution. I have these working defines for syscall_pic, but they
> > >> should not go in the kernel.
> > >
> > >I don't really think that's the case; it's a kernel interface issue,
> > >and since it's just a bunch of macros it doesn't add any bloat to the
> > >kernel proper.
> >
> > Except that somebody has to define and maintain _syscall_pic for every
> > architecture, and for all the combinations of -fcaller-saves,
> > -fomit-frame-pointer, -pg etc. glibc 2.1.x has already done this with
> > their generic syscall() interface, why add the same workload to the
> > kernel?
> >
>
> I don't really think the all combinations is a worry -- few of these
> options affect these things if properly written once.
>
> Does syscall() produce proper inline code?
syscall() is an external function in glibc, not an inline.
And it saves all needed registers around it.
In fact, I don't see what you need inline syscall macro for outside of the
kernel actually. Performance critical syscalls are in libc, the rest (like
create_module) really can waste 10 additional instructions.
BTW: IMHO it is a bad idea to create _syscall_pic as new macros because on
most archs it will be the same. Instead, one should use
#ifdef __pic__
#else
#endif
in the definitions. __pic__ is defined by the compiler if you compile
-fpic/-fPIC on i386, sparc, maybe others.
Cheers,
Jakub
___________________________________________________________________
Jakub Jelinek | jakub@redhat.com | http://sunsite.mff.cuni.cz/~jj
Linux version 2.3.39 on a sparc64 machine (1343.49 BogoMips)
___________________________________________________________________
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sun Jan 23 2000 - 21:00:17 EST