lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <eef5cc64-190d-12e4-5318-212bbc9511b0@linux.intel.com>
Date:   Thu, 20 Oct 2022 19:52:26 +0530
From:   "Kancharla, Sreehari" <sreehari.kancharla@...ux.intel.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     Loic Poulain <loic.poulain@...aro.org>, netdev@...r.kernel.org,
        kuba@...nel.org, davem@...emloft.net, johannes@...solutions.net,
        ryazanov.s.a@...il.com, m.chetan.kumar@...el.com,
        chandrashekar.devegowda@...el.com, linuxwwan@...el.com,
        chiranjeevi.rapolu@...ux.intel.com, haijun.liu@...iatek.com,
        ricardo.martinez@...ux.intel.com, dinesh.sharma@...el.com,
        ilpo.jarvinen@...ux.intel.com, moises.veleta@...el.com,
        sreehari.kancharla@...el.com
Subject: Re: [PATCH net-next 2/2] net: wwan: t7xx: Add NAPI support

Hi Andy,

On 10/10/2022 8:51 PM, Andy Shevchenko wrote:
> On Mon, Oct 10, 2022 at 07:52:49PM +0530, Kancharla, Sreehari wrote:
>> On 9/12/2022 6:23 PM, Loic Poulain wrote:
>>> On Fri, 9 Sept 2022 at 18:40, Sreehari Kancharla
>>> <sreehari.kancharla@...ux.intel.com> wrote:
> ...
>
>>>>           if (!rxq->que_started) {
>>>>                   atomic_set(&rxq->rx_processing, 0);
>>>> -               dev_err(dpmaif_ctrl->dev, "Work RXQ: %d has not been started\n", rxq->index);
>>>> -               return;
>>>> +               dev_err(rxq->dpmaif_ctrl->dev, "Work RXQ: %d has not been started\n", rxq->index);
>>>> +               return work_done;
>>>>           }
>>>>
>>>> -       ret = pm_runtime_resume_and_get(dpmaif_ctrl->dev);
>>>> -       if (ret < 0 && ret != -EACCES)
>>>> -               return;
>>>> +       if (!rxq->sleep_lock_pending) {
>>>> +               ret = pm_runtime_resume_and_get(rxq->dpmaif_ctrl->dev);
>>> AFAIK, polling is not called in a context allowing you to sleep (e.g.
>>> performing a synced pm runtime operation).
>> Device will be in resumed state when NAPI poll is invoked from IRQ context,
>> but host/driver can trigger RPM suspend to device. so we are using pm_runtime_resume_and_get
>> here to prevent runtime suspend.
> If it's known that device is always in power on state here, there is no need to
> call all this, but what you need is to bump the reference counter. Perhaps you
> need pm_runtime_get_noresume(). I.o.w. find the proper one and check that is
> not sleeping.

Agree, incrementing the reference counter will be sufficient. we will replace
pm_runtime_resume_and_get with pm_runtime_get_noresume in v2 submission.

Regards,
Sreehari

Powered by blists - more mailing lists