Re: [patch 06/11] syslets: core, documentation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Russell King <[email protected]> wrote:

> On Tue, Feb 13, 2007 at 03:20:42PM +0100, Ingo Molnar wrote:
> > +Arguments to the system call are implemented via pointers to arguments.
> > +This not only increases the flexibility of syslet atoms (multiple syslets
> > +can share the same variable for example), but is also an optimization:
> > +copy_uatom() will only fetch syscall parameters up until the point it
> > +meets the first NULL pointer. 50% of all syscalls have 2 or less
> > +parameters (and 90% of all syscalls have 4 or less parameters).
> > +
> > + [ Note: since the argument array is at the end of the atom, and the
> > +   kernel will not touch any argument beyond the final NULL one, atoms
> > +   might be packed more tightly. (the only special case exception to
> > +   this rule would be SKIP_TO_NEXT_ON_STOP atoms, where the kernel will
> > +   jump a full syslet_uatom number of bytes.) ]
> 
> What if you need to increase the number of arguments passed to a 
> system call later?  That would be an API change since the size of 
> syslet_uatom would change?

the syslet_uatom has a constant size right now, and space for a maximum 
of 6 arguments. /If/ the user knows that a specific atom (which for 
example does a sys_close()) takes only 1 argument, it could shrink the 
size of the atom down by 4 arguments.

[ i'd not actually recommend doing this, because it's generally a 
  volatile thing to play such tricks - i guess i shouldnt have written 
  that side-note in the header file :-) ]

there should be no new ABI issues: the existing syscall ABI never 
changes, it's only extended. New syslets can rely on new properties of 
new system calls. This is quite parallel to how glibc handles system 
calls.

> How do you propose syslet users know about these kinds of ABI issues 
> (including the endian-ness of 64-bit arguments) ?

syslet users would preferably be libraries like glibc - not applications 
- i'm not sure the raw syslet interface should be exposed to 
applications. Thus my current thinking is that syslets ought to be 
per-arch structures - no need to pad them out to 64 bits on 32-bit 
architectures - it's per-arch userspace that makes use of them anyway. 
system call encodings are fundamentally per-arch anyway - every arch 
does various fixups and has its own order of system calls.

but ... i'd not be against having a 'generic syscall layer' though, and 
syslets might be a good starting point for that. But that would 
necessiate a per-arch table of translating syscall numbers into this 
'generic' numbering, at minimum - or a separate sys_async_call_table[].

	Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux