Re: [rfc 2/2] x86, bts: use physically non-contiguous trace buffer

From: Peter Zijlstra
Date: Mon Apr 27 2009 - 06:53:56 EST


On Fri, 2009-04-24 at 10:31 +0200, Ingo Molnar wrote:
> * Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
>

> > The patch looks like a regression to me. vmalloc memory is slower
> > to allocate, slower to free, slower to access and can exhaust or
> > fragment the vmalloc arena. Confused.
>
> Performance does not matter here (this is really a slowpath), but
> fragmentation does matter, especially on 32-bit systems.
>
> I'd not uglify the code via vmap() - and vmap has the same
> fundamental address space limitations on 32-bit as vmalloc().
>
> The existing kmalloc() is fine. We do larger than PAGE_SIZE
> allocations elsewhere too (the kernel stack for example), and this
> is a debug facility, so failing the allocation is not a big problem
> even if it happens.

Nobody has yet told what the typical size of these allocations are. If
they're large enough to account in pages, one should arguable use the
page allocator not kmalloc. Also, any >3 order allocation (>32kb) are
very likely to fail. Having this ptrace interface work in the (unloaded)
development environment but not in a (loaded) production environment
will render it basically useless IMHO.

Having a regular high order allocation with vmalloc/vmap fallback is
quite normal, esp. if one wants to promote the use of this facility as
usable.

So, no, I very strongly disagree that the existing kmalloc is fine.


PS. I get shitloads of order-4 alloc failures from GEM after a few days
of uptime on my laptop.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/