Re: [Lse-tech] Re: [RFC] [PATCH] Scalable Statistics Counters

Andi Kleen (ak@suse.de)
Fri, 7 Dec 2001 14:23:21 +0100


On Fri, Dec 07, 2001 at 06:22:14PM +0530, Dipankar Sarma wrote:
> Your per-cpu area patch looks like a good solution with a very simple
> implementation. BTW, some OSes map the per-cpu data areas
> to the same virtual address for each CPU avoiding the per-cpu data
> array lookup. I am not sure if this really saves much, we are ourselves
> trying to understand the overhead of such array lookup with
> statctrs.

Using virtual addresses with per cpu mappings would be rather difficult to
implement for i386, because it uses the linux page table directly in
hardware. It would mean that you couldn't simply reuse the same top level
page for all clone()s sharing the same mm_struct, but would need to allocate
one per CPU.

On i386 the old method from the SGI PDA patch looks cheapest: just having
a pointer in task_struct and set it in the scheduler.

-Andi
-
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/