From patchwork Tue Jul 9 02:15:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Wang X-Patchwork-Id: 2825054 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EA8CCC0AB2 for ; Tue, 9 Jul 2013 02:15:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D723420142 for ; Tue, 9 Jul 2013 02:15:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D6F252011B for ; Tue, 9 Jul 2013 02:15:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751736Ab3GICPy (ORCPT ); Mon, 8 Jul 2013 22:15:54 -0400 Received: from e28smtp01.in.ibm.com ([122.248.162.1]:46817 "EHLO e28smtp01.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751524Ab3GICPx (ORCPT ); Mon, 8 Jul 2013 22:15:53 -0400 Received: from /spool/local by e28smtp01.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 9 Jul 2013 07:38:25 +0530 Received: from d28dlp01.in.ibm.com (9.184.220.126) by e28smtp01.in.ibm.com (192.168.1.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 9 Jul 2013 07:38:24 +0530 Received: from d28relay01.in.ibm.com (d28relay01.in.ibm.com [9.184.220.58]) by d28dlp01.in.ibm.com (Postfix) with ESMTP id 5F985E004F; Tue, 9 Jul 2013 07:45:32 +0530 (IST) Received: from d28av05.in.ibm.com (d28av05.in.ibm.com [9.184.220.67]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r692GJqi12976264; Tue, 9 Jul 2013 07:46:19 +0530 Received: from d28av05.in.ibm.com (loopback [127.0.0.1]) by d28av05.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r692FiX4017808; Tue, 9 Jul 2013 12:15:45 +1000 Received: from [9.111.17.129] (wangyun.cn.ibm.com [9.111.17.129]) by d28av05.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id r692Fhqw017692; Tue, 9 Jul 2013 12:15:43 +1000 Message-ID: <51DB724F.9050708@linux.vnet.ibm.com> Date: Tue, 09 Jul 2013 10:15:43 +0800 From: Michael Wang User-Agent: Mozilla/5.0 (X11; Linux i686; rv:16.0) Gecko/20121011 Thunderbird/16.0.1 MIME-Version: 1.0 To: Bartlomiej Zolnierkiewicz CC: "Rafael J. Wysocki" , Viresh Kumar , Borislav Petkov , Jiri Kosina , Tomasz Figa , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: Re: [v3.10 regression] deadlock on cpu hotplug References: <1443144.WnBWEpaopK@amdc1032> In-Reply-To: <1443144.WnBWEpaopK@amdc1032> X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13070902-4790-0000-0000-0000092C922B Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, Bartlomiej On 07/08/2013 11:26 PM, Bartlomiej Zolnierkiewicz wrote: [snip] > > # echo 0 > /sys/devices/system/cpu/cpu3/online > # echo 0 > /sys/devices/system/cpu/cpu2/online > # echo 0 > /sys/devices/system/cpu/cpu1/online > # while true;do echo 1 > /sys/devices/system/cpu/cpu1/online;echo 0 > /sys/devices/system/cpu/cpu1/online;done > > The commit in question (2f7021a8) was merged in v3.10-rc5 as a fix for > commit 031299b ("cpufreq: governors: Avoid unnecessary per cpu timer > interrupts") which was causing a kernel warning to show up. > > Michael/Viresh: do you have some idea how to fix the issue? Thanks for the report :) would you like to take a try on below patch and see whether it solve the issue? Regards, Michael Wang > > Best regards, > -- > Bartlomiej Zolnierkiewicz > Samsung R&D Institute Poland > Samsung Electronics > -- > 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/ > --- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c index 5af40ad..aa05eaa 100644 --- a/drivers/cpufreq/cpufreq_governor.c +++ b/drivers/cpufreq/cpufreq_governor.c @@ -229,6 +229,8 @@ static void set_sampling_rate(struct dbs_data *dbs_data, } } +static struct lock_class_key j_cdbs_key; + int cpufreq_governor_dbs(struct cpufreq_policy *policy, struct common_dbs_data *cdata, unsigned int event) { @@ -366,6 +368,8 @@ int (struct cpufreq_policy *policy, kcpustat_cpu(j).cpustat[CPUTIME_NICE]; mutex_init(&j_cdbs->timer_mutex); + lockdep_set_class(&j_cdbs->timer_mutex, &j_cdbs_key); + INIT_DEFERRABLE_WORK(&j_cdbs->work, dbs_data->cdata->gov_dbs_timer); }