Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754990Ab1BWNc5 (ORCPT ); Wed, 23 Feb 2011 08:32:57 -0500 Received: from bombadil.infradead.org ([18.85.46.34]:52496 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754923Ab1BWNcz convert rfc822-to-8bit (ORCPT ); Wed, 23 Feb 2011 08:32:55 -0500 Subject: Re: [CFS Bandwidth Control v4 5/7] sched: add exports tracking cfs bandwidth control statistics From: Peter Zijlstra To: Paul Turner Cc: linux-kernel@vger.kernel.org, Bharata B Rao , Dhaval Giani , Balbir Singh , Vaidyanathan Srinivasan , Gautham R Shenoy , Srivatsa Vaddagiri , Kamalesh Babulal , Ingo Molnar , Pavel Emelyanov , Herbert Poetzl , Avi Kivity , Chris Friesen , Nikhil Rao In-Reply-To: <20110216031841.258879435@google.com> References: <20110216031831.571628191@google.com> <20110216031841.258879435@google.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Date: Wed, 23 Feb 2011 14:32:12 +0100 Message-ID: <1298467932.2217.763.camel@twins> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 607 Lines: 15 On Tue, 2011-02-15 at 19:18 -0800, Paul Turner wrote: > + raw_spin_lock(&cfs_b->lock); > + cfs_b->throttled_time += (rq->clock - cfs_rq->throttled_timestamp); > + raw_spin_unlock(&cfs_b->lock); That seems to put the cost of things on the wrong side. Read is rare, update is frequent, and you made the frequent thing the most expensive one. -- 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/