From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Gleixner Subject: Re: CpuFreq Laptop Scaling broken? Date: Sat, 6 Sep 2014 00:47:35 +0200 (CEST) Message-ID: References: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Harry van Haaren , "linux-rt-users@vger.kernel.org" , Steven Rostedt , "Rafael J. Wysocki" , Carsten Emde To: Viresh Kumar Return-path: Received: from www.linutronix.de ([62.245.132.108]:35100 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751470AbaIEWrj (ORCPT ); Fri, 5 Sep 2014 18:47:39 -0400 In-Reply-To: Sender: linux-rt-users-owner@vger.kernel.org List-ID: On Fri, 5 Sep 2014, Viresh Kumar wrote: > On 5 September 2014 17:36, Harry van Haaren wrote: > > The down_read_trylock() fails, the other checks are fine. > > So my initial guess was correct :) > > > If i'm understanding correctly, the cpufreq_rwsem locks the module > > from being unloaded during critical sections while writing to CPU > > speed etc? > > Its not about changing speed, but its more of a lock for critical sections > only.. So, yes its required.. > > > Would that mean that an un-matched pair of down_read() up_write() > > could cause the failure of changing CPU speed? > > Probably yes, but why doesn't that happen without rt? I think Carsten had looked into this.