Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1477331pxu; Thu, 17 Dec 2020 10:51:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJyz6UGkffZGQAeM0fVgJ0qxe1QcbX1yLKYo63NTqY8dsDNUhgd6vJqgehfLayYysM8FHP4F X-Received: by 2002:aa7:dc5a:: with SMTP id g26mr757797edu.35.1608231077906; Thu, 17 Dec 2020 10:51:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608231077; cv=none; d=google.com; s=arc-20160816; b=NfpvTmLUjGW9rLCEEmLMTRUluGlf0qjK5Ao3FOQMqrlHfJawjwEHkytenSX8r758Cm KWNVVhEsBWKb/dVfx70t4QmmthksGfwAHTNGGYYxCDI/QEtCHV+S4s1lIzenr4Vqmrlg 7KkEmAB4e7elWI8DNAyRS4kpdfqq5pdpcAREI6OGG8m6oixx1lwhqtO3uGw+9Lmq8rYJ wWrTCInJpIPual7JWyd0oyLxT2gskw8ZBluOhit2drBWLyytvuISDUmNMyxF9f7K8VJi 51Bx18/eIuxGz6bdOhnc2HLQAdhYJGR81gekt3jQXmNJdf5/V8RdtsK4kKIkktC09yro 9bjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=02u8Dsl66xAX2x9VDf8pp+9Zcn9sUu8zZbuiELaOrQI=; b=Gjx11jQgYEABQd25zJsOCfWaAKARvONXW+dssR9+VWn8UuZKx9IV/rFDvokXcfVZns obTn3v5d9vKvKwLBaQun1KbK5udd/NNPOt+E/tThXgK8sdZP14TX/DL2/avxHJrZ+L5W 12u7LpiTwZKfhVSj/6yUTMG3Whj2+bJNGJy/J3QJ4BRNM3KarnWaDWuh9uxE85gAJEoo JsQ+I0Wz1SB6ioz1/UgFtwDz4I+bnyRvd1zFzJQM6y+JjDOPLsAEfPRsfwdHNLtUh04J jCzlHdP5eVWokGqRKcGbjp9EqK8QuBP820ao1BJn7yCkx2ZL1abYAGzp++5Ui9q/sukb ZEWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kGaH8z++; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m13si5500701edi.155.2020.12.17.10.50.55; Thu, 17 Dec 2020 10:51:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kGaH8z++; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728163AbgLQSuM (ORCPT + 99 others); Thu, 17 Dec 2020 13:50:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727063AbgLQSuL (ORCPT ); Thu, 17 Dec 2020 13:50:11 -0500 Received: from mail-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFCA6C0617B0 for ; Thu, 17 Dec 2020 10:49:19 -0800 (PST) Received: by mail-il1-x12f.google.com with SMTP id 2so26771001ilg.9 for ; Thu, 17 Dec 2020 10:49:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=02u8Dsl66xAX2x9VDf8pp+9Zcn9sUu8zZbuiELaOrQI=; b=kGaH8z++E1wZGQJ9CCiZbeEc0HDauNPgBP49gLWN3u6pFPH9ObzqiDACq4jVDSMc3a Z7zlUL83yMcehtTiADp8DrEkHYk4OH8ZrvlOhusWqKD2GmrOmVGeaXZgPozedoDQhD++ FHJ5Mmzl1KzXWcYnVviciNBwaBI5L3Mf8TSWJMc/IkaABwvvlBrdOPSElMLwNn+l5D7M v/BWsRE1lsIITadNCcrTY3hztPACfshPNQo2FN/gqpaSZyhtsuJUzBGgjODdLXVTjTLo SLApV0OOv4Br+FEx+of+NS1P85uTmYt2KGYa6Eytut0QOoLyIKrGi4q5wizcRJq5LW4q 5u9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=02u8Dsl66xAX2x9VDf8pp+9Zcn9sUu8zZbuiELaOrQI=; b=iEkLAodOSROxXsuQnaGOEMxfKioyZz8XmqOVGgogPhAjGTubTnFrinUM35XXJhXyV0 B07IUuJQ5Hp3NxfHaCMzjmqkLqSttoF51FHJrIyFPhzXW39SMtm025UPGsz4R6/DP++a xGj8peo2xv6HG2uuI9gyIm4/9XgK4TAGJhWJ4ml/Ob2cMj/oaZVLZlUFMr6AHVsbRbRO Htn2VhOwt58QUK2ri15Szzy0jHs7r585YOmHhmJFJ95njB96R1RJYO6LBDuokbQQfeol h4utpR0J4+pz1IuFf52hp9JW6I1TgqjU39x0DdmZakNuGnhCcW4gQTy95JQ3tXK7NF1z YE5A== X-Gm-Message-State: AOAM531OltZ+P1b1YIMjuPDN46yAjR2CgFO1blN/15d9hF/Ma6bYJBkV ZR9y6shrkygpfu6bB8/dskldusWTb675MQ== X-Received: by 2002:a92:ba82:: with SMTP id t2mr196649ill.139.1608230959056; Thu, 17 Dec 2020 10:49:19 -0800 (PST) Received: from [172.22.22.4] (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.googlemail.com with ESMTPSA id x17sm3601844ilj.67.2020.12.17.10.49.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Dec 2020 10:49:18 -0800 (PST) Subject: Re: [PATCH] remoteproc: Create a separate workqueue for recovery tasks To: rishabhb@codeaurora.org Cc: Bjorn Andersson , linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, tsoni@codeaurora.org, psodagud@codeaurora.org, sidgup@codeaurora.org References: <1607806087-27244-1-git-send-email-rishabhb@codeaurora.org> <87c3f902b94bc243fc28e0ce79303dd4@codeaurora.org> From: Alex Elder Message-ID: <35e2106f-d738-4018-50f2-17afcbc627f7@linaro.org> Date: Thu, 17 Dec 2020 12:49:17 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <87c3f902b94bc243fc28e0ce79303dd4@codeaurora.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/17/20 12:21 PM, rishabhb@codeaurora.org wrote: > On 2020-12-17 08:12, Alex Elder wrote: >> On 12/15/20 4:55 PM, Bjorn Andersson wrote: >>> On Sat 12 Dec 14:48 CST 2020, Rishabh Bhatnagar wrote: >>> >>>> Create an unbound high priority workqueue for recovery tasks. >> >> I have been looking at a different issue that is caused by >> crash notification. >> >> What happened was that the modem crashed while the AP was >> in system suspend (or possibly even resuming) state.  And >> there is no guarantee that the system will have called a >> driver's ->resume callback when the crash notification is >> delivered. >> >> In my case (in the IPA driver), handling a modem crash >> cannot be done while the driver is suspended; i.e. the >> activities in its ->resume callback must be completed >> before we can recover from the crash. >> >> For this reason I might like to change the way the >> crash notification is handled, but what I'd rather see >> is to have the work queue not run until user space >> is unfrozen, which would guarantee that all drivers >> that have registered for a crash notification will >> be resumed when the notification arrives. >> >> I'm not sure how that interacts with what you are >> looking for here.  I think the workqueue could still >> be unbound, but its work would be delayed longer before >> any notification (and recovery) started. >> >>                     -Alex >> >> > In that case, maybe adding a "WQ_FREEZABLE" flag might help? Yes, exactly. But how does that affect whatever you were trying to do with your patch? -Alex . . .