From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751454Ab3HBKQD (ORCPT ); Fri, 2 Aug 2013 06:16:03 -0400 Received: from e28smtp02.in.ibm.com ([122.248.162.2]:52518 "EHLO e28smtp02.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751288Ab3HBKP7 (ORCPT ); Fri, 2 Aug 2013 06:15:59 -0400 Message-ID: <51FB85F5.6060600@linux.vnet.ibm.com> Date: Fri, 02 Aug 2013 15:42:05 +0530 From: "Srivatsa S. Bhat" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0 MIME-Version: 1.0 To: Viresh Kumar CC: "Rafael J. Wysocki" , Linux PM list , cpufreq@vger.kernel.org, LKML , Lists linaro-kernel Subject: Re: [Update][PATCH] cpufreq: Do not hold driver module references for additional policy CPUs References: <2362640.pUofnXyzOi@vostro.rjw.lan> <51FAC46D.1000703@linux.vnet.ibm.com> <1757496.qSuJuAun9Z@vostro.rjw.lan> <2298639.F0Qv2QqRnZ@vostro.rjw.lan> <51FB568B.1040902@linux.vnet.ibm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13080210-5816-0000-0000-0000093B896D Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/02/2013 03:06 PM, Viresh Kumar wrote: > On 2 August 2013 12:19, Srivatsa S. Bhat > wrote: >> On 08/02/2013 10:07 AM, Viresh Kumar wrote: >>> So, we can't rmmod the module as soon as it is inserted and so the >>> problem stays as is. :( >>> >> >> No, we get one step closer to the solution, since we fix the inconsistency >> between refcounts. Next step would be to get rid of refcounts and use >> locking like you suggested. Then we can rmmod it easily. I'm assuming >> Rafael has the same plan. > > Not really. We are putting the reference at the end of add_dev() and > so refcount would be zero when we aren't running any critical sections. > And so, we can rmmod the module now and that problem is gone. > Ah, yes, you are right. > @Rafael: I will try to do generic cleanups in cpufreq in coming time > and will take care to remove .owner field completely in that. Until that > point your patches look fine: > > For both of your patches: > Acked-by: Viresh Kumar > Regards, Srivatsa S. Bhat