linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Hillf Danton <hdanton@sina.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	Saravana Kannan <saravanak@google.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	"chenxiang (M)" <chenxiang66@hisilicon.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	John Garry <john.garry@huawei.com>,
	"scsi list : TARGET SUBSYSTEM" <linux-scsi@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Linux PM <linux-pm@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: Qestion about device link
Date: Wed, 12 May 2021 13:32:21 +0200	[thread overview]
Message-ID: <CAJZ5v0gbRb+CGEV2D09KqhiRPPWxPBtXmwrp5iyuB-xTBEBfvA@mail.gmail.com> (raw)
In-Reply-To: <20210512063542.3079-1-hdanton@sina.com>

On Wed, May 12, 2021 at 8:38 AM Hillf Danton <hdanton@sina.com> wrote:
>
> On Tue, 11 May 2021 21:43:40 Rafael J. Wysocki  wrote:
> > >  #ifdef CONFIG_SRCU
> > > +static void __device_link_free_fn(struct work_struct *work)
> > > +{
> > > +       device_link_free(container_of(work, struct device_link, srcu.work));
> > > +}
> > > +
> > >  static void __device_link_free_srcu(struct rcu_head *rhead)
> > >  {
> > > -       device_link_free(container_of(rhead, struct device_link, rcu_head));
> > > +       struct device_link *link = container_of(rhead, struct device_link,
> > > +                                               srcu.rhead);
> > > +       struct work_struct *work = &link->srcu.work;
> > > +
> > > +       /*
> > > +        * Because device_link_free() may sleep in some cases, schedule the
> > > +        * execution of it instead of invoking it directly.
> > > +        */
> > > +       INIT_WORK(work, __device_link_free_fn);
> > > +       schedule_work(work);
> > >  }
>
> Nope, you need something like queue_work(system_unbound_wq, work); instead
> because of the blocking wq callback.

system_long_wq rather, as it really doesn't matter when it gets completed.

  parent reply	other threads:[~2021-05-12 11:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-11  3:59 Qestion about device link chenxiang (M)
2021-05-11 10:42 ` Question about device link//Re: " chenxiang (M)
2021-05-11 18:23   ` Saravana Kannan
2021-05-11 19:13     ` Rafael J. Wysocki
2021-05-11 19:41       ` Saravana Kannan
2021-05-11 14:39 ` Rafael J. Wysocki
2021-05-11 19:16   ` Rafael J. Wysocki
2021-05-11 19:24     ` Saravana Kannan
2021-05-11 19:43       ` Rafael J. Wysocki
     [not found]         ` <20210512063542.3079-1-hdanton@sina.com>
2021-05-12 11:32           ` Rafael J. Wysocki [this message]
2021-05-12  3:24     ` chenxiang (M)
2021-05-12 14:04       ` Rafael J. Wysocki
2021-05-12 19:05         ` Saravana Kannan
2021-05-13 12:13           ` Rafael J. Wysocki
2021-05-13 16:43             ` Saravana Kannan
2021-05-13  3:00         ` chenxiang (M)
2021-05-13 12:14           ` Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJZ5v0gbRb+CGEV2D09KqhiRPPWxPBtXmwrp5iyuB-xTBEBfvA@mail.gmail.com \
    --to=rafael@kernel.org \
    --cc=chenxiang66@hisilicon.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdanton@sina.com \
    --cc=john.garry@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rjw@rjwysocki.net \
    --cc=saravanak@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).