Re: Redesign of copy_from_user()
tab-mTI/[email protected] (Vincent Hanquez)
| Newsgroups | gmane.linux.cluster.openmosix.devel |
|---|---|
| Message-ID | <[email protected]> |
On Sun, Feb 26, 2006 at 05:35:00AM +0100, Andreas Schäfer wrote: > To improve on this I propose a new "double buffering" schema: upon > write openMosix reserves a little buffer (which might grow or be > shrunk later on) on remote. before running copy_from_user, this buffer > is filled in one go by receiving from deputy. As the buffer is larger > than one page, we can benefit from streaming and transfers will be > sped up. Also by streaming the dependency on ultra low latency links > would be mitigated. > > Of course there are downsides to this: > - The implementation of hooking into copy_from_user() is really > beautiful in it's present state. My proposal would severly butcher > it by not being elegant and introducing more complexity. > - An additional kernel-internal copy is necessary which raises CPU > load (but I dunno how much this affects current systems). > > Still I'm convinced the advances prevail the disadvantages. We need to > get round of limited write performance, this is even more important > with gigabit ethernet (not the old school fast ethernet I'm having at > home). What do you guys think of that? Any comments welcome. Hi Andreas, sorry for the long delay, The double buffering is effectively solving this problem, but the question is how to fill the buffer on the remote side ? I actually implemented the double buffering the first time I write the syscall for 2.6, but it's actually very difficult to be able to fill it. You have to implement ~N functions, that unwrap the syscall, analyse which argument need to be copied_from_user, copy the stuff and send it to deputy. you end up duplicating the copy part of every syscall in linux, which for some syscall is absolutely horrible (ioctl ?) On a deputy side, it's actually a bit easier for the copy_to_user, since you just have to bundle a list of (address_to_write_to,data) .. but you have to make sure: no copy_from_user is done on thoses addresses (you need a consistent view of your memory), and that permissions are OK. for the permission that could juste be as easy as doing them on the remote side with check_copy_to_user and return -EFAULT if one of them return EFAULT that might be a neat optimization, but I believe optimisation should be done after we got all features working .. anyone for finishing remote_execve ? Cheers, -- Vincent Hanquez ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642