[lkml]   [2007]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch 05/11] syslets: core code

On Thu, 15 Feb 2007, Linus Torvalds wrote:
> So I think that a good implementation just does everything up-front, and
> doesn't _need_ a user buffer that is live over longer periods, except for
> the actual results. Exactly because the whole alloc/teardown is nasty.

Btw, this doesn't necessarily mean "not supporting multiple atoms at all".

I think the batching of async things is potentially a great idea. I think
it's quite workable for "open+fstat" kind of things, and I agree that it
can solve other things too (the "socket+bind+connect+sendmsg+rcv" kind of
complex setup things).

But I suspect that if we just said:
- we limit these atom sequences to just linear sequences of max "n" ops
- we read them all in in a single go at startup

we actually avoid several nasty issues. Not just the memory allocation
issue in user space (now it's perfectly ok to build up a sequence of ops
in temporary memory and throw it away once it's been submitted), but also
issues like the 32-bit vs 64-bit compatibility stuff (the compat handlers
would just convert it when they do the initial copying, and then the
actual run-time wouldn't care about user-level pointers having different
sizes etc).

Would it make the interface less cool? Yeah. Would it limit it to just a
few linked system calls (to avoid memory allocation issues in the kernel)?
Yes again. But it would simplify a lot of the interface issues.

It would _also_ allow the "sys_aio_read()" function to build up its
*own* set of atoms in kernel space to actually do the read, and there
would be no impact of the actual run-time wanting to read stuff from user
space. Again - it's actually the same issue as with the compat system
call: by making the interfaces do things up-front rather than dynamically,
it becomes more static, but also easier to do interface translations. You
can translate into any arbitrary internal format _once_, and be done with

I dunno.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-02-15 21:17    [W:0.241 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site