From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754085AbYI3Rej (ORCPT ); Tue, 30 Sep 2008 13:34:39 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753896AbYI3ReV (ORCPT ); Tue, 30 Sep 2008 13:34:21 -0400 Received: from casper.infradead.org ([85.118.1.10]:59914 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753882AbYI3ReT (ORCPT ); Tue, 30 Sep 2008 13:34:19 -0400 Subject: Re: [PATCH v10 Golden] Unified trace buffer From: Peter Zijlstra To: Steven Rostedt Cc: Linus Torvalds , Jonathan Corbet , Mathieu Desnoyers , LKML , Ingo Molnar , Thomas Gleixner , Andrew Morton , prasad@linux.vnet.ibm.com, "Frank Ch. Eigler" , David Wilder , hch@lst.de, Martin Bligh , Christoph Hellwig , Masami Hiramatsu , Steven Rostedt , Arnaldo Carvalho de Melo In-Reply-To: References: <20080929233539.GA31143@Krystal> <20080930000307.GA2929@Krystal> <20080930034603.GA13801@Krystal> <20080930092001.69849210@bike.lwn.net> <1222790072.24384.21.camel@twins> Content-Type: text/plain Date: Tue, 30 Sep 2008 19:00:43 +0200 Message-Id: <1222794043.24384.22.camel@twins> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2008-09-30 at 12:48 -0400, Steven Rostedt wrote: > On Tue, 30 Sep 2008, Linus Torvalds wrote: > > > > Trace buffers are different, though. Do people realize that doing the > > overloading means that you never EVER can use those buffers for anything > > else? Do people realize that it means that splice() and friends are out of > > the question? > > > > > Trouble is, looking at it I see no easy way out, > > > > Quite frankly, we could just put it at the head of the page itself. Having > > a "whole page" for the trace data is not possible anyway, since the trace > > header itself will always eat 8 bytes. > > > > And I do think it would potentially be a better model. Or at least safer. > > Actually, looking at the code, there is no reason I need to keep this in > the frame buffer itself. I've also encapsulated the accesses to the > incrementing of the pointers so it would be trivial to try other > approaches. > > The problem we had with the big array struct is that we can want large > buffers and to do that with pointers means we would need to either come up > with a large allocator or use vmap. > > But I just realized that I could also just make a link list of page > pointers and do the exact same thing without having to worry about page > frames. Again, the way I coded this up, it is quite trivial to replace > the handling of the pages with other schemes. The list_head in the page frame should be available regardless of splice() stuffs.