Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755330AbYAQDjZ (ORCPT ); Wed, 16 Jan 2008 22:39:25 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752078AbYAQDjR (ORCPT ); Wed, 16 Jan 2008 22:39:17 -0500 Received: from ms-smtp-05.nyroc.rr.com ([24.24.2.59]:50746 "EHLO ms-smtp-05.nyroc.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751721AbYAQDjQ (ORCPT ); Wed, 16 Jan 2008 22:39:16 -0500 Date: Wed, 16 Jan 2008 22:39:09 -0500 (EST) From: Steven Rostedt X-X-Sender: rostedt@gandalf.stny.rr.com To: Paul Mackerras cc: Mathieu Desnoyers , john stultz , LKML , Ingo Molnar , Linus Torvalds , Andrew Morton , Peter Zijlstra , Christoph Hellwig , Gregory Haskins , Arnaldo Carvalho de Melo , Thomas Gleixner , Tim Bird , Sam Ravnborg , "Frank Ch. Eigler" , Steven Rostedt , Daniel Walker Subject: Re: [RFC PATCH 16/22 -v2] add get_monotonic_cycles In-Reply-To: <18318.51622.37470.246611@cargo.ozlabs.ibm.com> Message-ID: References: <20080115220824.GB22242@Krystal> <20080116031730.GA2164@Krystal> <20080116145604.GB31329@Krystal> <1f1b08da0801161436k4a7ac1e3kd83590951e7bebb9@mail.gmail.com> <1200523867.6127.5.camel@localhost.localdomain> <1200536889.6127.52.camel@localhost.localdomain> <20080117024000.GD2322@Krystal> <20080117025004.GE2322@Krystal> <18318.51622.37470.246611@cargo.ozlabs.ibm.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 887 Lines: 21 On Thu, 17 Jan 2008, Paul Mackerras wrote: > > It's very hard to do a per-thread counter in the VDSO, since threads > in the same process see the same memory, by definition. You'd have to > have an array of counters and have some way for each thread to know > which entry to read. Also you'd have to find space for tens or > hundreds of thousands of counters, since there can be that many > threads in a process sometimes. I was thinking about this. What would also work is just the ability to read the schedule counter for the current cpu. Now this would require that the task had a way to know which CPU it was currently on. -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/