Re: [PATCH] kmalloc_percpu

William Lee Irwin III (wli@holomorphy.com)
Wed, 7 May 2003 05:13:19 -0700


At some point in the past, my attribution was stripped from:
>> Not as bad as it initially sounds; on non-PAE i386, it's 4KB and would
>> hurt. On PAE i386, it's 32B and can be shoehorned, say, in thread_info.
>> Then the rest is just a per-cpu kernel pmd and properly handling vmalloc
>> faults (which are already handled properly for non-PAE vmallocspace).
>> There might be other reasons to do it, like reducing the virtualspace
>> overhead of the atomic kmap area, but it's not really time yet.

On Tue, May 06, 2003 at 09:10:24PM -0700, Martin J. Bligh wrote:
> Even if the space isn't a problem, having a full TLB flush on thread
> context switch sounds sucky. Per-node is sufficient for most things,
> and is much cheaper (update on cross-node migrate).

The scheme described requires no TLB flushing or pgd switching when
switching between threads in the same mm. Providing a true per-thread
mapping, like one for the stack, might require an invlpg or two at each
switch, but that wasn't mentioned here.

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