From patchwork Thu Oct 27 20:27:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacob Pan X-Patchwork-Id: 9400369 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1EE9E60231 for ; Thu, 27 Oct 2016 20:25:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0C8992A3BC for ; Thu, 27 Oct 2016 20:25:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 00B0B2A3BE; Thu, 27 Oct 2016 20:25:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7D6CA2A3BC for ; Thu, 27 Oct 2016 20:25:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935544AbcJ0UZy (ORCPT ); Thu, 27 Oct 2016 16:25:54 -0400 Received: from mga07.intel.com ([134.134.136.100]:13711 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935293AbcJ0UZx (ORCPT ); Thu, 27 Oct 2016 16:25:53 -0400 Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP; 27 Oct 2016 13:25:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,553,1473145200"; d="scan'208";a="24575998" Received: from jacob-builder.jf.intel.com (HELO jacob-builder) ([10.7.199.78]) by orsmga005.jf.intel.com with ESMTP; 27 Oct 2016 13:25:52 -0700 Date: Thu, 27 Oct 2016 13:27:36 -0700 From: Jacob Pan To: Sebastian Andrzej Siewior Cc: Petr Mladek , Zhang Rui , Thomas Gleixner , Eduardo Valentin , Tejun Heo , Peter Zijlstra , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, jacob.jun.pan@linux.intel.com Subject: Re: [PATCH 3/3] thermal/intel_powerclamp: Convert to CPU hotplug state Message-ID: <20161027132736.2a74c0b6@jacob-builder> In-Reply-To: <20161027151726.s2uavcnnbtjvmboq@linutronix.de> References: <1476707572-32215-1-git-send-email-pmladek@suse.com> <1476707572-32215-4-git-send-email-pmladek@suse.com> <20161021132118.4239af86@jacob-builder> <20161024154807.GQ23809@pathway.suse.cz> <20161024095529.2b1855b4@icelake> <20161027145348.GV23809@pathway.suse.cz> <20161027151726.s2uavcnnbtjvmboq@linutronix.de> Organization: OTC X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Thu, 27 Oct 2016 17:17:26 +0200 Sebastian Andrzej Siewior wrote: > On 2016-10-27 16:53:48 [+0200], Petr Mladek wrote: > > > > In each case, I wonder if the problem is caused by the conversion > > to the kthread worker or by the CPU hotplug state conversion. > > drop the hotplug patch and you will see. > Petr, I dropped hp patch no long see the hang during suspend to s3. However, the problem seems to be this line, If I do the above, everything works with S3 and CPU HP patch. Inside kthread_destroy_worker() kthread_flush_worker(worker); never completes then blocks s3 entry! I will be at LPC next week also, we can chat about that. Thanks, Jacob > > Best Regards, > > Petr > > Sebastian [Jacob Pan] --- 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/thermal/intel_powerclamp.c b/drivers/thermal/intel_powerclamp.c index 390e50b..b61da57 100644 --- a/drivers/thermal/intel_powerclamp.c +++ b/drivers/thermal/intel_powerclamp.c @@ -574,7 +574,7 @@ static void stop_power_clamp_worker(unsigned long cpu) */ del_timer_sync(&w_data->wakeup_timer); clear_bit(w_data->cpu, cpu_clamping_mask); - kthread_destroy_worker(w_data->worker); +// kthread_destroy_worker(w_data->worker); w_data->worker = NULL; }