From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753720AbYIZTP1 (ORCPT ); Fri, 26 Sep 2008 15:15:27 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752624AbYIZTPU (ORCPT ); Fri, 26 Sep 2008 15:15:20 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:45132 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752578AbYIZTPT (ORCPT ); Fri, 26 Sep 2008 15:15:19 -0400 Subject: Re: [PATCH v6] Unified trace buffer From: Peter Zijlstra To: Steven Rostedt Cc: LKML , Ingo Molnar , Thomas Gleixner , Andrew Morton , prasad@linux.vnet.ibm.com, Linus Torvalds , Mathieu Desnoyers , "Frank Ch. Eigler" , David Wilder , hch@lst.de, Martin Bligh , Christoph Hellwig , Masami Hiramatsu , Steven Rostedt , Arnaldo Carvalho de Melo , Mike Travis In-Reply-To: References: <20080925185154.230259579@goodmis.org> <20080925185236.244343232@goodmis.org> <48DC406D.1050508@redhat.com> Content-Type: text/plain Date: Fri, 26 Sep 2008 21:14:33 +0200 Message-Id: <1222456474.16700.289.camel@lappy.programming.kicks-ass.net> 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 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. > +};