[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <19f34abd0806071319h19893ad5kcf938e1067b2a752@mail.gmail.com>
Date: Sat, 7 Jun 2008 22:19:44 +0200
From: "Vegard Nossum" <vegard.nossum@...il.com>
To: "Andi Kleen" <andi@...stfloor.org>
Cc: "Pekka Enberg" <penberg@...helsinki.fi>,
"Ingo Molnar" <mingo@...e.hu>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kmemcheck: don't track pages allocated with interrupts disabled
On Sat, Jun 7, 2008 at 9:47 PM, Andi Kleen <andi@...stfloor.org> wrote:
>
>> Maybe we can do the splitting when kmemcheck is enabled for the first
>> time, either with the proc handler or at boot if kmemcheck=1 is passed
>> on the command line. Both of these contexts should/can be
>> !irqs_disabled(), I think.
>
> You could always split at boot when the CONFIG is enabled. I assume the
> CONFIG alone has already quite a lot of overhead and it will be only
> on in debug kernels and adding some more TLB misses shouldn't be really
> a problem. Using 2MB pages in kernel is merely an optimization.
Actually, no, the CONFIG itself is now very low overhead. The only
thing we do is a very simple check in the slab allocator each time you
allocate or free an object (it's a couple of if()s, I doubt it would
show up in anything but microbenchmarks). These is also maybe two or
three calls for each page fault, but they return very quickly.
I didn't test, but this should be the only penalty of enabling the
CONFIG. Of course, once you pass kmemcheck=1 at boot it will be a
disaster :-)
But you are probably right nevertheless; the overhead of 4K pages
instead 2M is probably negligible in most cases.
Vegard
--
"The animistic metaphor of the bug that maliciously sneaked in while
the programmer was not looking is intellectually dishonest as it
disguises that the error is the programmer's own creation."
-- E. W. Dijkstra, EWD1036
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists