Invoking a system call from within the kernel
valdis.kletnieks at vt.edu
valdis.kletnieks at vt.edu
Sat Nov 18 13:44:44 EST 2017
On Sat, 18 Nov 2017 13:15:27 -0500, Demi Marie Obenour said:
> However, the ioctl I actually want to implement (see above) does the
> system call asynchronously. That isnât possible using the existing
> APIs.
Ever consider that it's because there's no clear semantics to what
executing an arbitrary syscall asyncronously even *means*?
What doe an async getuid() mean? For bonus points, what does it
return if the program does an async getuid(), and then does a
setuid() call *before the async call completes*?
What is the return value of an async call that fails? How is it
returned, and how do you tell if a negative return code is
from the async code failing, or the syscall failing?
> See above :) Basically, I am trying to improve performance and reduce
> complexity of programs that need to do a lot of buffered file I/O.
We already have an AIO subsystem for exactly this. And eventfd's, and
poll(), and a bunch of other stuff.
And they improve performance, but increase complexity. It's pretty
hard to make
while (rc=read(....) > 0)
rc2 = write(....)
less complex. Catching the return of an async call makes it more complex.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 486 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20171118/4d6421ac/attachment.bin
More information about the Kernelnewbies
mailing list