* Re: Unified tracing buffer
[not found] ` <1222162270.16700.57.camel@lappy.programming.kicks-ass.net>
@ 2008-09-23 18:13 ` Mathieu Desnoyers
2008-09-23 18:33 ` Christoph Lameter
0 siblings, 1 reply; 3+ messages in thread
From: Mathieu Desnoyers @ 2008-09-23 18:13 UTC (permalink / raw)
To: Peter Zijlstra
Cc: Tom Zanussi, prasad, Martin Bligh, Linux Kernel Mailing List,
Linus Torvalds, Thomas Gleixner, Steven Rostedt, od,
Frank Ch. Eigler, Andrew Morton, hch, David Wilder,
Christoph Lameter, linux-mm
* Peter Zijlstra (a.p.zijlstra@chello.nl) wrote:
> On Tue, 2008-09-23 at 00:25 -0500, Tom Zanussi wrote:
>
> > - get rid of anything having to do with padding, nobody needs it and its
> > only affect has been to horribly distort and complicate a lot of the
> > code
> > - get rid of sub-buffers, they just cause confusion
> > - get rid of mmap, nobody uses it
> > - no sub-buffers and no mmap support means we can get rid of most of the
> > callbacks, and a lot of API confusion along with them
> > - add relay flags - they probably should have been used from the
> > beginning and options made explicit instead of being shoehorned into the
> > callback functions.
>
> - get rid of the vmap buffers as they cause tlb pressure and eat up
> precious vspace on 32 bit platforms.
>
Although I agree on the basic idea, namely to use a sane amount of TLB
entries for tracing, I disagree on the way proposed to reach this goal.
Such memory management concerns belong to the mm field and should not be
done "oh so cleverly" by a buffer management infrastructure in the back
of the kernel memory management infrastructure.
I think we should instead try to figure out what is currently missing in
the kernel vmap mechanism (probably the ability to vmap from large 4MB
pages after boot), and fix _that_ instead (if possible), which would not
only benefit to tracing, but also to module support.
Also, I would like to keep a contiguous address mapping within buffers
so we could keep the buffer read/write code as simple as possible,
leveraging the existing CPU MM unit.
I added Christoph Lameter to the CC list, he always comes with clever
ideas. :)
Mathieu
--
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Unified tracing buffer
2008-09-23 18:13 ` Unified tracing buffer Mathieu Desnoyers
@ 2008-09-23 18:33 ` Christoph Lameter
2008-09-23 18:56 ` Linus Torvalds
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Lameter @ 2008-09-23 18:33 UTC (permalink / raw)
To: Mathieu Desnoyers
Cc: Peter Zijlstra, Tom Zanussi, prasad, Martin Bligh,
Linux Kernel Mailing List, Linus Torvalds, Thomas Gleixner,
Steven Rostedt, od, Frank Ch. Eigler, Andrew Morton, hch,
David Wilder, linux-mm
Mathieu Desnoyers wrote:
>
> I think we should instead try to figure out what is currently missing in
> the kernel vmap mechanism (probably the ability to vmap from large 4MB
> pages after boot), and fix _that_ instead (if possible), which would not
> only benefit to tracing, but also to module support.
With some custom code one can vmap 2MB pages on x86. See the VMEMMAP support
in the x86 arch. The code in mm/sparse-vmemmap.c could be abstracted for a
general 2MB mapping API to reduce TLB pressure for the buffers. If there are
concerns about fragmentation then one could fallback to 4kb TLBs. See the
virtualizable compound page patchset which does something similar.
> I added Christoph Lameter to the CC list, he always comes with clever
> ideas. :)
Oh mostly we are just recycling the old ideas.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Unified tracing buffer
2008-09-23 18:33 ` Christoph Lameter
@ 2008-09-23 18:56 ` Linus Torvalds
0 siblings, 0 replies; 3+ messages in thread
From: Linus Torvalds @ 2008-09-23 18:56 UTC (permalink / raw)
To: Christoph Lameter
Cc: Mathieu Desnoyers, Peter Zijlstra, Tom Zanussi, prasad,
Martin Bligh, Linux Kernel Mailing List, Thomas Gleixner,
Steven Rostedt, od, Frank Ch. Eigler, Andrew Morton, hch,
David Wilder, linux-mm
On Tue, 23 Sep 2008, Christoph Lameter wrote:
> Mathieu Desnoyers wrote:
> >
> > I think we should instead try to figure out what is currently missing in
> > the kernel vmap mechanism (probably the ability to vmap from large 4MB
> > pages after boot), and fix _that_ instead (if possible), which would not
> > only benefit to tracing, but also to module support.
No. Don't go there. Piece of absolute shit.
The problem with VMAP is that it's _limited_. We don't have reasonable
virtual address space holes for x86-32.
The other is that physically contiguos buffers are hard to come by.
Certainly not an acceptable solution.
The third is that if you have multiple buffers, you need to look them up
in software anyway, so the whole notion of mis-using the TLB to avoid a
software lookup is TOTAL CRAP.
Don't do virtual mapping. IT IS BROKEN. IT IS A TOTAL AND UTTER PIECE OF
SHIT.
I will absolutely not take any general-purpse tracing code if I'm aware of
it mis-using the TLB to play games.
Linus
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-09-23 18:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <33307c790809191433w246c0283l55a57c196664ce77@mail.gmail.com>
[not found] ` <1221869279.8359.31.camel@lappy.programming.kicks-ass.net>
[not found] ` <20080922140740.GB5279@in.ibm.com>
[not found] ` <1222094724.16700.11.camel@lappy.programming.kicks-ass.net>
[not found] ` <1222147545.6875.135.camel@charm-linux>
[not found] ` <1222162270.16700.57.camel@lappy.programming.kicks-ass.net>
2008-09-23 18:13 ` Unified tracing buffer Mathieu Desnoyers
2008-09-23 18:33 ` Christoph Lameter
2008-09-23 18:56 ` Linus Torvalds
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox