Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756416AbcJNUr5 (ORCPT ); Fri, 14 Oct 2016 16:47:57 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:17650 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752985AbcJNUrs (ORCPT ); Fri, 14 Oct 2016 16:47:48 -0400 To: Subhash Jadavani Cc: vinholikatti@gmail.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org (open list:UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER), linux-kernel@vger.kernel.org (open list) Subject: Re: [RESEND PATCH] scsi: ufs: fix race between clock gating and devfreq scaling work From: "Martin K. Petersen" Organization: Oracle Corporation References: <1476227759-22389-1-git-send-email-subhashj@codeaurora.org> Date: Fri, 14 Oct 2016 16:47:39 -0400 In-Reply-To: <1476227759-22389-1-git-send-email-subhashj@codeaurora.org> (Subhash Jadavani's message of "Tue, 11 Oct 2016 16:15:59 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 693 Lines: 15 >>>>> "Subhash" == Subhash Jadavani writes: Subhash> UFS devfreq clock scaling work may require clocks to be ON if Subhash> it need to execute some UFS commands hence it may request for Subhash> clock hold before issuing the command. But if UFS clock gating Subhash> work is already running in parallel, ungate work would end up Subhash> waiting for the clock gating work to finish and as clock gating Subhash> work would also wait for the clock scaling work to finish, we Subhash> would enter in deadlock state. Here is the call trace during Subhash> this deadlock state: Somebody from the UFS camp, please review! -- Martin K. Petersen Oracle Linux Engineering