From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755824AbZBEGrS (ORCPT ); Thu, 5 Feb 2009 01:47:18 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751471AbZBEGrG (ORCPT ); Thu, 5 Feb 2009 01:47:06 -0500 Received: from cantor.suse.de ([195.135.220.2]:56668 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751468AbZBEGrF convert rfc822-to-8bit (ORCPT ); Thu, 5 Feb 2009 01:47:05 -0500 Date: Thu, 05 Feb 2009 07:47:01 +0100 Message-ID: From: Takashi Iwai To: Andrew Morton Cc: Alex Romosan , linux-kernel@vger.kernel.org Subject: Re: 2.6.29-rc3: weird process after resume In-Reply-To: <20090204185645.bb9d86b2.akpm@linux-foundation.org> References: <878womf727.fsf@sycorax.lbl.gov> <20090204153954.844ac67b.akpm@linux-foundation.org> <87hc39ejx2.fsf@sycorax.lbl.gov> <20090204183142.11e6f661.akpm@linux-foundation.org> <20090204185645.bb9d86b2.akpm@linux-foundation.org> User-Agent: Wanderlust/2.12.0 (Your Wildest Dreams) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 Emacs/22.3 (x86_64-suse-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Wed, 4 Feb 2009 18:56:45 -0800, Andrew Morton wrote: > > On Wed, 4 Feb 2009 18:31:42 -0800 Andrew Morton wrote: > > > On Wed, 04 Feb 2009 17:45:13 -0800 Alex Romosan wrote: > > > > > Andrew Morton writes: > > > > > > > On Wed, 04 Feb 2009 09:25:20 -0800 > > > > Alex Romosan 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). > > > > > > > > > > > > > > > + 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 > > AuthorDate: Mon Jan 12 10:09:24 2009 +0100 > > Commit: Takashi Iwai > > 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 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 --- 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