From: Takashi Iwai <tiwai@suse.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Alex Romosan <romosan@sycorax.lbl.gov>, linux-kernel@vger.kernel.org
Subject: Re: 2.6.29-rc3: weird process after resume
Date: Thu, 05 Feb 2009 07:47:01 +0100 [thread overview]
Message-ID: <s5h3aet8joa.wl%tiwai@suse.de> (raw)
In-Reply-To: <20090204185645.bb9d86b2.akpm@linux-foundation.org>
At Wed, 4 Feb 2009 18:56:45 -0800,
Andrew Morton wrote:
>
> On Wed, 4 Feb 2009 18:31:42 -0800 Andrew Morton <akpm@linux-foundation.org> wrote:
>
> > On Wed, 04 Feb 2009 17:45:13 -0800 Alex Romosan <romosan@sycorax.lbl.gov> wrote:
> >
> > > Andrew Morton <akpm@linux-foundation.org> writes:
> > >
> > > > On Wed, 04 Feb 2009 09:25:20 -0800
> > > > Alex Romosan <romosan@sycorax.lbl.gov> wrote:
> > > >
> > > >> this is on a thinkpad t61p with an intel core2 cpu. i just noticed
> > > >> that after resuming from suspending to memory i get a weirdly named
> > > >> process. i did a ps before and after and the only difference was that
> > > >> before i had this process:
> > > >>
> > > >> [hda0/1]
> > > >>
> > > >> and after this one:
> > > >>
> > > >> [__?__;??____D__"?______]
> > > >>
> > > >> with everything else being the same. the laptop seems to be working
> > > >> fine and the problem could have been there for a while but i just
> > > >> didn't notice it. i am including my .config file. let me know if you
> > > >> need anything else.
> > > >
> > > > Were earlier kernels OK? If so, which version?
> > >
> > > i just tried 2.6.28 and there was no [hda0] kernel thread. 2.6.29-rc1
> > > and rc2 never resumed from suspend so i couldn't really try it.
> > >
> > > > What the heck is that kernel thread anyway? It looks like something
> > > > derived from an IDE device.
> > >
> > > i have no idea. hda is the cdrom (the disk is sata and shows up as
> > > sda).
> > >
> >
> > <rummages through a 68MB diff for a while>
> >
> > <finds a plum>
> >
> > + snprintf(qname, sizeof(qname), "hda%d", card->number);
> > + bus->workq = create_workqueue(qname);
> > + if (!bus->workq) {
> > + snd_printk(KERN_ERR "cannot create workqueue %s\n", qname);
> > + kfree(bus);
> > + return -ENOMEM;
> > + }
> >
> > so it's not IDE after all.
> >
> > commit 6acaed38a32e8571e92cfc832b971f9e4450c207
> > Author: Takashi Iwai <tiwai@suse.de>
> > AuthorDate: Mon Jan 12 10:09:24 2009 +0100
> > Commit: Takashi Iwai <tiwai@suse.de>
> > CommitDate: Mon Jan 12 10:33:56 2009 +0100
> >
> > ALSA: hda - Use own workqueue
> >
>
> btw. Please use create_singlethread_workqueue() if at all possible. I
> don't think we need a thread per CPU here.
Sorry I always forget that...
Alex, could you try the patch below? It's now in sound git tree:
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
thanks,
Takashi
===
>From e8c0ee5d77ec0f144c753a622c67dd96fa195d50 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Thu, 5 Feb 2009 07:34:28 +0100
Subject: [PATCH] ALSA: hda - Fix misc workqueue issues
Some fixes regarding snd-hda-intel workqueue:
- Use create_singlethread_workqueue() instead of create_workqueue()
as per-CPU work isn't required.
- Allocate workq name string properly
- Renamed the workq name to "hd-audio*" to be more obvious.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/pci/hda/hda_codec.c | 9 +++++----
sound/pci/hda/hda_codec.h | 1 +
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index b7bba7d..0b70813 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -487,7 +487,6 @@ int /*__devinit*/ snd_hda_bus_new(struct snd_card *card,
{
struct hda_bus *bus;
int err;
- char qname[8];
static struct snd_device_ops dev_ops = {
.dev_register = snd_hda_bus_dev_register,
.dev_free = snd_hda_bus_dev_free,
@@ -517,10 +516,12 @@ int /*__devinit*/ snd_hda_bus_new(struct snd_card *card,
mutex_init(&bus->cmd_mutex);
INIT_LIST_HEAD(&bus->codec_list);
- snprintf(qname, sizeof(qname), "hda%d", card->number);
- bus->workq = create_workqueue(qname);
+ snprintf(bus->workq_name, sizeof(bus->workq_name),
+ "hd-audio%d", card->number);
+ bus->workq = create_singlethread_workqueue(bus->workq_name);
if (!bus->workq) {
- snd_printk(KERN_ERR "cannot create workqueue %s\n", qname);
+ snd_printk(KERN_ERR "cannot create workqueue %s\n",
+ bus->workq_name);
kfree(bus);
return -ENOMEM;
}
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index 5810ef5..09a332a 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -614,6 +614,7 @@ struct hda_bus {
/* unsolicited event queue */
struct hda_bus_unsolicited *unsol;
+ char workq_name[16];
struct workqueue_struct *workq; /* common workqueue for codecs */
/* assigned PCMs */
--
1.6.1.2
next prev parent reply other threads:[~2009-02-05 6:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-04 17:25 Alex Romosan
2009-02-04 23:39 ` Andrew Morton
2009-02-05 1:45 ` Alex Romosan
2009-02-05 2:31 ` Andrew Morton
2009-02-05 2:56 ` Andrew Morton
2009-02-05 6:47 ` Takashi Iwai [this message]
2009-02-05 17:58 ` Alex Romosan
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=s5h3aet8joa.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=romosan@sycorax.lbl.gov \
/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
Powered by JetHome