From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37362) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4NfW-0003dk-Fn for qemu-devel@nongnu.org; Wed, 22 Aug 2012 23:01:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T4NfV-0007aW-26 for qemu-devel@nongnu.org; Wed, 22 Aug 2012 23:01:14 -0400 Received: from mail7.hitachi.co.jp ([133.145.228.42]:55609) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4NfU-0007aK-JM for qemu-devel@nongnu.org; Wed, 22 Aug 2012 23:01:12 -0400 Message-ID: <50359CE9.3000509@hitachi.com> Date: Thu, 23 Aug 2012 12:00:57 +0900 From: Masami Hiramatsu MIME-Version: 1.0 References: <20120822084251.17293.69086.stgit@ltc189.sdl.hitachi.co.jp> <20120822084312.17293.47596.stgit@ltc189.sdl.hitachi.co.jp> <1345642893.5069.31.camel@gandalf.local.home> <50358F13.1030607@hitachi.com> In-Reply-To: <50358F13.1030607@hitachi.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/5] trace-cmd: Use tracing directory to count CPUs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Steven Rostedt Cc: Herbert Xu , Arnd Bergmann , qemu-devel@nongnu.org, Frederic Weisbecker , Yoshihiro YUNOMAE , Rusty Russell , linux-kernel@vger.kernel.org, Borislav Petkov , virtualization@lists.linux-foundation.org, "Franch Ch. Eigler" , Ingo Molnar , Mathieu Desnoyers , Anthony Liguori , Greg Kroah-Hartman , Amit Shah , yrl.pp-manager.tt@hitachi.com (2012/08/23 11:01), Masami Hiramatsu wrote: > (2012/08/22 22:41), Steven Rostedt wrote: >> On Wed, 2012-08-22 at 17:43 +0900, Yoshihiro YUNOMAE wrote: >>> From: Masami Hiramatsu >>> >>> Count debugfs/tracing/per_cpu/cpu* to determine the >>> number of CPUs. >> >> I'm curious, do you find that sysconf doesn't return the # of CPUs the >> system has? > > No, sysconf returns the number of hosts CPUs, not guests. > >> I've had boxes where the per_cpu/cpu* had more cpus than the >> box actually holds. But this was a bug in the kernel, not the tool. This >> change log needs to have rational instead of just explaining what the >> patch does. > > Ah, I see. Hmm, then this should be enabled by a command line > option or an environment variable. Oops, I misunderstood. I'll add more comment for why this should be tried instead of sysconf. Thank you, -- Masami HIRAMATSU Software Platform Research Dept. Linux Technology Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: masami.hiramatsu.pt@hitachi.com