Re: [RFC][PATCH] linux-2.5.34_vsyscall_A0

From: Andrea Arcangeli (andrea@suse.de)
Date: Fri Oct 18 2002 - 12:11:39 EST


On Fri, Oct 18, 2002 at 09:45:41AM -0700, george anzinger wrote:
> Stephen Hemminger wrote:
> >
> > One reason gettimeofday ends up being important is that several
> > databases call it a lot. They use it to build up a transaction id. Under
> > big transaction loads, even the fast linux syscall path ends up being a
> > bottleneck. Also, on NUMA machines the data used for time of day (xtime)
> > ends up being a significant portion of the cache traffic.
> >
> > It would be great to rework the whole TSC time of day stuff to work with
> > per cpu data and allow unsychronized TSC's like NUMA. The problem is
> > that for fast user level access, there would need to be some way to find
> > out the current CPU and avoid preemption/migration for a short period.
> > It seems like the LDT stuff for per-thread data could provide the
> > current cpu (and maybe current pid) somehow. And it would be possible
> > to avoid preemption while in a vsyscall text page, some other Unix
> > variants do this to implement portions of the thread library in kernel
> > provided user text pages.
> >
> Now there is an idea! Lock preemption in user space if and

sounds not good to me, you would miss a wakeup and you would delay the
schedule of 1/HZ in the worst (close to the common) case.

My idea of encoding the cpuid in the top 8bit of each 64bit word that
can be read atomically (of course this trivially applies in the now
per-cpu two sequence numbers that defines the critical section for each
cpu) sounds a way superior solution to me to read coherent per-cpu data
enterely locklessy and without preemption locks.

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/



This archive was generated by hypermail 2b29 : Wed Oct 23 2002 - 22:00:43 EST