Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933417AbXKPOWb (ORCPT ); Fri, 16 Nov 2007 09:22:31 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758077AbXKPOWX (ORCPT ); Fri, 16 Nov 2007 09:22:23 -0500 Received: from cantor.suse.de ([195.135.220.2]:34671 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757550AbXKPOWW (ORCPT ); Fri, 16 Nov 2007 09:22:22 -0500 Date: Fri, 16 Nov 2007 15:21:08 +0100 Message-ID: From: Takashi Iwai To: Ingo Molnar Cc: Mark Lord , perex@perex.cz, Pavel Machek , Mark Lord , Thomas Gleixner , len.brown@intel.com, Andrew Morton , linux-kernel@vger.kernel.org, linux-pm@lists.linux-foundation.org, rjw@sisk.pl, Len Brown Subject: Re: [patch] snd hda suspend latency: shorten codec read In-Reply-To: <20071116125824.GA28082@elte.hu> References: <20071115181418.GA6603@ucw.cz> <473C825E.3030307@rtr.ca> <20071115193424.GA31691@elte.hu> <20071115193612.GA751@elte.hu> <473CC6D4.2010909@rtr.ca> <20071116055531.GA16273@elte.hu> <20071116071522.GA1453@elte.hu> <20071116082146.GA14685@elte.hu> <20071116112317.GA12724@elte.hu> <20071116124319.GA21978@elte.hu> <20071116125824.GA28082@elte.hu> User-Agent: Wanderlust/2.15.5 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 MULE XEmacs/21.5 (beta28) (fuki) (+CVS-20070806) (i386-suse-linux) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1352 Lines: 47 At Fri, 16 Nov 2007 13:58:24 +0100, Ingo Molnar wrote: > > > snd hda suspend latency goes down a second via the patch below. > > Ingo > > -------------> > Subject: snd hda suspend latency: shorten codec read > From: Ingo Molnar > > not sleeping for every codec read/write but doing a short udelay and > a conditional reschedule has cut suspend+resume latency by about 1 > second on my T60. > > Signed-off-by: Ingo Molnar Cute, I applied to ALSA tree now. Thanks! Takashi > --- > sound/pci/hda/hda_intel.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > Index: linux/sound/pci/hda/hda_intel.c > =================================================================== > --- linux.orig/sound/pci/hda/hda_intel.c > +++ linux/sound/pci/hda/hda_intel.c > @@ -555,7 +555,8 @@ static unsigned int azx_rirb_get_respons > } > if (!chip->rirb.cmds) > return chip->rirb.res; /* the last value */ > - schedule_timeout_uninterruptible(1); > + udelay(10); > + cond_resched(); > } while (time_after_eq(timeout, jiffies)); > > if (chip->msi) { > - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/