From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758282AbZBFClC (ORCPT ); Thu, 5 Feb 2009 21:41:02 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752089AbZBFCkx (ORCPT ); Thu, 5 Feb 2009 21:40:53 -0500 Received: from ozlabs.org ([203.10.76.45]:45658 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751815AbZBFCkx (ORCPT ); Thu, 5 Feb 2009 21:40:53 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18827.41762.860654.259240@cargo.ozlabs.ibm.com> Date: Fri, 6 Feb 2009 13:40:34 +1100 From: Paul Mackerras To: Ingo Molnar Cc: "Zhang, Yanmin" , linux-kernel@vger.kernel.org Subject: Re: [PATCH] perf_counter: Prevent oopses from per-cpu software counters In-Reply-To: <20090205142229.GB28443@elte.hu> References: <18826.28805.120988.303819@drongo.ozlabs.ibm.com> <20090205142229.GB28443@elte.hu> X-Mailer: VM 8.0.9 under Emacs 22.2.1 (i486-pc-linux-gnu) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ingo Molnar writes: > You are right that "pagefaults" and "context switches" do get generated by > tasks - but there is a per cpu and system wide notion of 'number of > pagefaults', and people might be interested in monitoring that. Sure. What I was trying to say was that the existing code for the page fault, context switch and task migration software counters uses "current", so as it is, they can't be used as per-cpu counters. > The existence and widespread use of "vmstat", and its display of system-wide > count of "context switches" (and administrator's reliance on judging a > workload based on those counts) is i think ample proof that it makes sense > to have those counters on a per CPU basis too. > > So how about fixing these sw counts to properly work as percpu counters too? > Or am i misssing something subtle that makes that impossible? I'll do that, but I think it can be a second patch on top of the one I posted. My existing patch doesn't disable anything that previously worked, it just stops you doing things that would cause an oops. So I think it is strictly an improvement on the current situation. Paul.