you don't need to access the per-process state of course.
the code will do:
switch_to() {
[..]
if (prev->vsyscall_disabled != next->vsyscall_disabled) {
set the right fixmap page and invlpg
}
[..]
}
the vsyscall code itself will not need to know anything about the
current->vsyscall_disabled. The only overhead is such above branch.
> page per mm_struct that is mapped in there. But it could not be in the
> normal vsyscall area (otherwise you couldn't share the kernel pagetables
> anymore), but somewhere else in the address space.
>
> I think a global sysctl that just modifies the global vsyscall pages is more
> suitable here. It avoids the overhead of needing a per process page.
I don't see the need of a per-process page. We only need a per-cpu
first level pagetable at the very end of the address space, but that's
not a problem at all, it's one more page _per_cpu_ only (not per task).
It's much less overhead of per-cpu keventd etc...
> I see no real need anyways to do it per process. When you have one process
> that cannot deal with vsyscalls the whole system will get a bit slower,
> but the slowdown shouldn't be noticeable anyways. If you run your highend
> database which does thousands of gettimeofday each second just don't set
> the sysctl.
yep. Having the per-task switch was only a way to make the host system
more efficient for the 1% uml users that has to fake the time and that
cannot live with the max possible perormance of having uml running with
the system time in sync with the host. the per-task switch is meant to
give uml the possibility of being fully revirtualized without hurting
the host too much, in the unlikely case you need it.
Andrea
-
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/