From: Takashi Iwai <tiwai@suse.de>
To: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: [alsa-devel] [PATCH] ALSA: hda: Use standard waitqueue for RIRB wakeup
Date: Fri, 13 Dec 2019 14:42:22 +0100 [thread overview]
Message-ID: <s5hr218e401.wl-tiwai@suse.de> (raw)
In-Reply-To: <s5hv9qke4dm.wl-tiwai@suse.de>
On Fri, 13 Dec 2019 14:34:13 +0100,
Takashi Iwai wrote:
>
> On Fri, 13 Dec 2019 14:05:31 +0100,
> Kai Vehmanen wrote:
> >
> > Hey,
> >
> > On Tue, 10 Dec 2019, Takashi Iwai wrote:
> >
> > > This patch attempts to improve the situation by introducing the
> > > standard waitqueue in the RIRB waiter side instead of polling. The
> >
> > this patch was part of the testing as well, so looks good. One minor
> > nit only:
> >
> > > @@ -216,6 +216,9 @@ void snd_hdac_bus_update_rirb(struct hdac_bus *bus)
> > > else if (bus->rirb.cmds[addr]) {
> > > bus->rirb.res[addr] = res;
> > > bus->rirb.cmds[addr]--;
> > > + if (!bus->rirb.cmds[addr] &&
> > > + waitqueue_active(&bus->rirb_wq))
> > > + wake_up(&bus->rirb_wq);
> >
> > Checkpath would like to have a comment here:
> >
> > WARNING: waitqueue_active without comment
> > #77: FILE: sound/hda/hdac_controller.c:220:
> > + waitqueue_active(&bus->rirb_wq))
>
> Yeah, that was known to me, too. Actually it's misleading; what
> actually matters is the memory barrier or other synchronization there,
> and this should work as is because of the current code path.
> (Besides, majority of existing waitqueue_active() have no comments at
> all :)
>
> And, now I found wa_has_sleeper() as a better replacement of
> waitqueue_active() that explicitly cares about synchronization.
> So I'll change with this in a later patch (after unification to
> hda-core).
On the second thought, the extra barrier should be utterly
superfluous, so I'll go for commenting about the spinlock instead...
Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next prev parent reply other threads:[~2019-12-13 21:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-10 14:57 [alsa-devel] [PATCH] ALSA: hda: Use standard waitqueue for RIRB wakeup Takashi Iwai
2019-12-12 17:17 ` Kai Vehmanen
2019-12-12 17:23 ` Takashi Iwai
2019-12-12 18:42 ` Takashi Iwai
2019-12-13 13:05 ` Kai Vehmanen
2019-12-13 13:34 ` Takashi Iwai
2019-12-13 13:42 ` Takashi Iwai [this message]
2019-12-18 14:17 ` Jon Hunter
2019-12-18 14:31 ` Takashi Iwai
2019-12-19 12:15 ` Jon Hunter
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=s5hr218e401.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=kai.vehmanen@linux.intel.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