From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751445AbWFDC2g (ORCPT ); Sat, 3 Jun 2006 22:28:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751449AbWFDC2g (ORCPT ); Sat, 3 Jun 2006 22:28:36 -0400 Received: from mail32.syd.optusnet.com.au ([211.29.132.63]:12721 "EHLO mail32.syd.optusnet.com.au") by vger.kernel.org with ESMTP id S1751445AbWFDC2f (ORCPT ); Sat, 3 Jun 2006 22:28:35 -0400 From: Con Kolivas To: Peter Williams Subject: Re: [RFC 1/4] sched: Add CPU rate soft caps Date: Sun, 4 Jun 2006 12:27:54 +1000 User-Agent: KMail/1.9.3 Cc: Linux Kernel , Sam Vilain , "Eric W.Biederman" , Srivatsa , Balbir Singh , Kirill Korotaev , Mike Galbraith , Kingsley Cheung , CKRM , Ingo Molnar , Rene Herman References: <20060604010831.2648.37997.sendpatchset@heathwren.pw.nest> <20060604010841.2648.43027.sendpatchset@heathwren.pw.nest> In-Reply-To: <20060604010841.2648.43027.sendpatchset@heathwren.pw.nest> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200606041227.55892.kernel@kolivas.org> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Sunday 04 June 2006 11:08, Peter Williams wrote: > 3. Thanks to suggestions from Con Kolivas with respect to alternative > methods to reduce the possibility of a task being starved of CPU while > holding an important system resource, enforcement of caps is now > quite strict. However, there will still be occasions where caps may be > exceeded due to this mechanism vetoing enforcement. Transcription bug here: > int fastcall __sched mutex_lock_interruptible(struct mutex *lock) > { > + int ret; > + > might_sleep(); > return __mutex_fastpath_lock_retval > (&lock->count, __mutex_lock_interruptible_slowpath); should be ret = > + > + if (!ret) > + inc_mutex_count(); > + > + return ret; > } > compare with here: > EXPORT_SYMBOL(mutex_lock_interruptible); > @@ -366,8 +390,13 @@ static inline int __mutex_trylock_slowpa > */ > int fastcall __sched mutex_trylock(struct mutex *lock) > { > - return __mutex_fastpath_trylock(&lock->count, > + int ret = __mutex_fastpath_trylock(&lock->count, > __mutex_trylock_slowpath); > + > + if (!ret) > + inc_mutex_count(); > + > + return ret; > } > > EXPORT_SYMBOL(mutex_trylock); -- -ck