[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.1.10.0809261956000.21618@gandalf.stny.rr.com>
Date: Fri, 26 Sep 2008 19:56:52 -0400 (EDT)
From: Steven Rostedt <rostedt@...dmis.org>
To: Mike Travis <travis@....com>
cc: Peter Zijlstra <peterz@...radead.org>,
LKML <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...e.hu>,
Thomas Gleixner <tglx@...utronix.de>,
Andrew Morton <akpm@...ux-foundation.org>,
prasad@...ux.vnet.ibm.com,
Linus Torvalds <torvalds@...ux-foundation.org>,
Mathieu Desnoyers <compudj@...stal.dyndns.org>,
"Frank Ch. Eigler" <fche@...hat.com>,
David Wilder <dwilder@...ibm.com>, hch@....de,
Martin Bligh <mbligh@...gle.com>,
Christoph Hellwig <hch@...radead.org>,
Masami Hiramatsu <mhiramat@...hat.com>,
Steven Rostedt <srostedt@...hat.com>,
Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Subject: Re: [PATCH v6] Unified trace buffer
On Fri, 26 Sep 2008, Mike Travis wrote:
> Peter Zijlstra wrote:
> > On Fri, 2008-09-26 at 14:05 -0400, Steven Rostedt wrote:
> >> +struct ring_buffer {
> >> + unsigned long size;
> >> + unsigned pages;
> >> + unsigned flags;
> >> + int cpus;
> >> + atomic_t record_disabled;
> >> +
> >> + struct mutex mutex;
> >> +
> >> + /* FIXME: this should be online CPUS */
> >> + struct ring_buffer_per_cpu *buffers[NR_CPUS];
> >
> > actually nr_possible makes sense, and you might consider always
> > allocating buffers (and keeping them for offlined cpus) to avoid massive
> > allocations/frees cpu-hotplug events.
> >
> > Mike Travis has been going over the kernel removing constructs like
> > this, and replacing them with dynamically allocated arrays of
> > nr_possible.
> >
> >> +};
>
> The other thing to consider is using a percpu variable.
This structure is allocated on request.
-- Steve
--
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