Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp603867pxb; Fri, 8 Jan 2021 13:05:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJxEyZ8ghjOkfgrs1Z5dBoUGkqq5V6Kq12CMVCd+eAs169GiWR6Ak3/8zoGEDl2koacN+LJL X-Received: by 2002:a50:fd18:: with SMTP id i24mr6730848eds.146.1610139925678; Fri, 08 Jan 2021 13:05:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610139925; cv=none; d=google.com; s=arc-20160816; b=jN7102HMISz4D/gJDnrpNZm6vN3ThEst56we/+WiEl5haRaFzcrSBKlN6A/P5umyxD aphGB5Qx+w1GMXQa2jCWjSQWMWY/Z1iKeagu5DYnXG0S0XYlMKyEC9/FGtM0KCDqQRcQ 297HYv+HT0b7vYxZDKSFC+btPRmSq5ncTd7+FLIw+MR0bxdGSNFxnDbtpMfltHnMVr0p YP8j2uS1e7PpHfuP4GZFUYB1h6fSJQWHqLQFuT7pc8qtfD6mYhfUMmUIDP+FIdTiToEC W+f5pQ0fJHgsWTPqZwDUUKUCM9Qu4Dgz2+csKwJIKBMZV8RCnXJAJ/lgKkRYM/GuTwO7 LNbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :sender:dkim-signature; bh=P2i/w2NGM6kNbgN8vyY6XxmXd+fcd/x2L+FLno+MqfE=; b=ipP+8oj95CijidzEi2GSlpjJrl6YrtGgjjVTQGFMsQXr1RFlyqJC2Hmysv6gZtfnM+ yJPas6WR4FOwvl+Yg7ZC9MAJXSbqHUwCY64ebFsrKxTr9G14xYKy7UOH3PYM8LKWhcPA RoIkrAcfOgN1xHlU8Yf/pi6CupqJxfSR1pD/eFuyX9A4anl+5FwYc7WdK3B+IQMEQNyq BD31LgpdaAPo7S+CqkySIOrj6XtZy4eZu7Oihd7Efd9kn2ab5jf+rNTPgWsE9PmL/GMx +tq1cMOiqs12e++1QOQE3j+mdb5xDdqbBKWq/Ayy5mrWm/DRT4jleswSO0CMVbB1f9Ln 16fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=Mm+SvarP; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g10si3916075edt.499.2021.01.08.13.05.01; Fri, 08 Jan 2021 13:05:25 -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=@mg.codeaurora.org header.s=smtp header.b=Mm+SvarP; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729580AbhAHVEA (ORCPT + 99 others); Fri, 8 Jan 2021 16:04:00 -0500 Received: from so254-31.mailgun.net ([198.61.254.31]:29484 "EHLO so254-31.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729069AbhAHVEA (ORCPT ); Fri, 8 Jan 2021 16:04:00 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1610139814; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=P2i/w2NGM6kNbgN8vyY6XxmXd+fcd/x2L+FLno+MqfE=; b=Mm+SvarPs81VykYyb7bm2LQMLjJk5u06n1PH72NvZe+mtFc3aPHN2Cgc9Tuw1D0cVXiq5TDk Ldr0xQEoL1c6HhPSFeHpbfXFPZ2yob8wtYgDvVEdaLo/hjjRZ3EJeXIu8kKlSgmlvFUK0pfl 8M1SbRwkVeVmZetXZpstvf8N8+s= X-Mailgun-Sending-Ip: 198.61.254.31 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n05.prod.us-west-2.postgun.com with SMTP id 5ff8c888415a6293c51dd1ce (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Fri, 08 Jan 2021 21:03:04 GMT Sender: rishabhb=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id B0D3AC433CA; Fri, 8 Jan 2021 21:03:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: rishabhb) by smtp.codeaurora.org (Postfix) with ESMTPSA id DD5FBC433C6; Fri, 8 Jan 2021 21:03:02 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Fri, 08 Jan 2021 13:03:02 -0800 From: rishabhb@codeaurora.org To: Bjorn Andersson Cc: Alex Elder , linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, tsoni@codeaurora.org, psodagud@codeaurora.org, sidgup@codeaurora.org Subject: Re: [PATCH] remoteproc: Create a separate workqueue for recovery tasks In-Reply-To: References: <1607806087-27244-1-git-send-email-rishabhb@codeaurora.org> <87c3f902b94bc243fc28e0ce79303dd4@codeaurora.org> <35e2106f-d738-4018-50f2-17afcbc627f7@linaro.org> Message-ID: <65cb9eb0837cd4edee2f2902055f412c@codeaurora.org> X-Sender: rishabhb@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-12-21 16:35, Bjorn Andersson wrote: > On Thu 17 Dec 12:49 CST 2020, Alex Elder wrote: > >> 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? >> > > I don't see any impact on Rishabh's change in particular, syntactically > it would just be a matter of adding another flag and the impact would > be > separate from his patch. > > In other words, creating a separate work queue to get the long running > work off the system_wq and making sure that these doesn't run during > suspend & resume seems very reasonable to me. > > The one piece that I'm still contemplating is the HIPRIO, I would like > to better understand the actual impact - or perhaps is this a result of > everyone downstream moving all their work to HIPRIO work queues, > starving the recovery? > Hi Bjorn, You are right, this is a result of downstream having HIPRIO workqueues therefore starving recovery. I don't have actual data to support the flag as of now. If needed for now we can skip this flag and add it later with sufficient data? > Regards, > Bjorn