From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758776AbZB1AAa (ORCPT ); Fri, 27 Feb 2009 19:00:30 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754058AbZB1AAP (ORCPT ); Fri, 27 Feb 2009 19:00:15 -0500 Received: from smtp-out.google.com ([216.239.33.17]:4389 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753609AbZB1AAN (ORCPT ); Fri, 27 Feb 2009 19:00:13 -0500 DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=mime-version:in-reply-to:references:date:message-id:subject:from:to: cc:content-type:content-transfer-encoding:x-system-of-record; b=Pxwb5QNyjr5OIgE8DyEs7xHjdAkvRoObxnMa3urGGlozjYeHEGNRgXbDQs0qxsQxj 5w93SZERq1uguov4I+ZQA== MIME-Version: 1.0 In-Reply-To: References: <20090227140537.390905c4.kamezawa.hiroyu@jp.fujitsu.com> <20090227162928.6225fc80.kamezawa.hiroyu@jp.fujitsu.com> Date: Fri, 27 Feb 2009 16:00:06 -0800 Message-ID: Subject: Re: [PATCH] change cpuacct usage percpu format v2 From: Ken Chen To: KAMEZAWA Hiroyuki Cc: "linux-kernel@vger.kernel.org" , "menage@google.com" , "lizf@cn.fujitsu.com" , "balbir@linux.vnet.ibm.com" , mingo@elte.hu, "akpm@linux-foundation.org" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-System-Of-Record: true Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 27, 2009 at 3:34 PM, KAMEZAWA Hiroyuki wrote: > "a lot of" ? I talking about cpu hotplug and reading another file as > /sys/devices/system/cpu/present every time before reading this file > gives much much much more overhead ;) yes, really a lot. CPU hotplug is an uncommon event. It happens perhaps once a day? maybe once an hour? User monitoring process usually reads usage_percpu at fairly high rate, say once a sec. At each pass it will need to parse N number of CPU index. The overhead is N_CPU * T, where T is time in second between cpu hotplug event. Assume T = one day, on a moderate sized 64-CPU size machine, the overhead is: 64 * 86400 : 1, that's like 5.5 million to 1 ratio. To me that is *high* overhead. - Ken