Messages in this thread | | | Date | Thu, 19 Dec 2002 01:14:41 +0100 | From | Pavel Machek <> | Subject | Re: Intel P6 vs P7 system call performance |
| |
Hi!
> > > But this is exactly what I expect to happen. If you want to implement > > > gettimeofday() at user-level you need to modify the page. > > > > Note that I really don't think we ever want to do the user-level > > gettimeofday(). The complexity just argues against it, it's better to try > > to make system calls be cheap enough that you really don't care. > > I'd say that this should not be "fixed" from userspace, but from the > kernel. Thus if the kernel knows that the "gettimeofday" can be made > faster by doing it completely in userspace, then that system call > should be "patched" by the kernel to do it faster for everybody. > > Next, someone might find a faster (full-userspace) way to do some > "reads"(*). Then it might pay to check for that specific > filedescriptor in userspace, and only call into the kernel for the > other filedescriptors. The idea is that the kernel knows best when > optimizations are possible. > > Thus that ONE magic address is IMHO not the right way to do it. By > demultiplexing the stuff in userspace, you can do "sane" things with > specific syscalls. > > So for example, the code at 0xffff80000 would be: > mov 0x00,%eax > int $80 > ret > > (in the case where sysenter & friends is not available)
This could save that one register needed for 6-args syscalls. If code at 0xffff8000 was mov %ebp, %eax; sysenter; ret for P4, you could do 6-args syscalls this way. Pavel -- Worst form of spam? Adding advertisment signatures ala sourceforge.net. What goes next? Inserting advertisment *into* email? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |