From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH 23/25] ALSA/dummy: Replace tasklet with softirq hrtimer Date: Thu, 31 Aug 2017 16:26:50 +0200 Message-ID: References: <20170831105827.401092373@linutronix.de> <20170831142117.4131-1-o-takashi@sakamocchi.jp> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 4A4CF2673BA for ; Thu, 31 Aug 2017 16:26:50 +0200 (CEST) In-Reply-To: <20170831142117.4131-1-o-takashi@sakamocchi.jp> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Takashi Sakamoto Cc: alsa-devel@alsa-project.org, keescook@chromium.org, peterz@infradead.org, linux-kernel@vger.kernel.org, mingo@redhat.com, john.stultz@linaro.org, tglx@linutronix.de, hch@lst.org, anna-maria@linutronix.de List-Id: alsa-devel@alsa-project.org On Thu, 31 Aug 2017 16:21:17 +0200, Takashi Sakamoto wrote: > > Hi, > > On Aug 31 2017 21:23, Anna-Maria Gleixner wrote: > > From: Thomas Gleixner > > > > The tasklet is used to defer the execution of snd_pcm_period_elapsed() to > > the softirq context. Using the CLOCK_MONOTONIC_SOFT base invokes the timer > > callback in softirq context as well which renders the tasklet useless. > > > > Signed-off-by: Thomas Gleixner > > Signed-off-by: Anna-Maria Gleixner > > Cc: Jaroslav Kysela > > Cc: Takashi Iwai > > Cc: Takashi Sakamoto > > Cc: alsa-devel@alsa-project.org > > --- > > sound/drivers/dummy.c | 16 +++------------- > > 1 file changed, 3 insertions(+), 13 deletions(-) > > I prefer this patch as long as this driver can still receive callbacks > from hrtimer subsystem. > > Reviewed-by: Takashi Sakamoto > > Unfortunately, I have too poor machine to compile whole kernel now, thus > didn't do any tests, sorry. > > I note that ALSA pcsp driver uses a combination of hrtimer/tasklet for the > same purpose. I think we can simplify it, too. Please refer to a patch in > the end of this message. (But not tested yet for the above reason...) The pcsp is a bit special. It's really high frequent irq calls for controlling the beep on/off, thus offloading the whole isn't good. thanks, Takashi From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751463AbdHaO0x (ORCPT ); Thu, 31 Aug 2017 10:26:53 -0400 Received: from mx2.suse.de ([195.135.220.15]:49429 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751086AbdHaO0v (ORCPT ); Thu, 31 Aug 2017 10:26:51 -0400 Date: Thu, 31 Aug 2017 16:26:50 +0200 Message-ID: From: Takashi Iwai To: Takashi Sakamoto Cc: perex@perex.cz, anna-maria@linutronix.de, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, peterz@infradead.org, mingo@redhat.com, hch@lst.org, keescook@chromium.org, john.stultz@linaro.org, tglx@linutronix.de Subject: Re: [PATCH 23/25] ALSA/dummy: Replace tasklet with softirq hrtimer In-Reply-To: <20170831142117.4131-1-o-takashi@sakamocchi.jp> References: <20170831105827.401092373@linutronix.de> <20170831142117.4131-1-o-takashi@sakamocchi.jp> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.2 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) 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 List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 31 Aug 2017 16:21:17 +0200, Takashi Sakamoto wrote: > > Hi, > > On Aug 31 2017 21:23, Anna-Maria Gleixner wrote: > > From: Thomas Gleixner > > > > The tasklet is used to defer the execution of snd_pcm_period_elapsed() to > > the softirq context. Using the CLOCK_MONOTONIC_SOFT base invokes the timer > > callback in softirq context as well which renders the tasklet useless. > > > > Signed-off-by: Thomas Gleixner > > Signed-off-by: Anna-Maria Gleixner > > Cc: Jaroslav Kysela > > Cc: Takashi Iwai > > Cc: Takashi Sakamoto > > Cc: alsa-devel@alsa-project.org > > --- > > sound/drivers/dummy.c | 16 +++------------- > > 1 file changed, 3 insertions(+), 13 deletions(-) > > I prefer this patch as long as this driver can still receive callbacks > from hrtimer subsystem. > > Reviewed-by: Takashi Sakamoto > > Unfortunately, I have too poor machine to compile whole kernel now, thus > didn't do any tests, sorry. > > I note that ALSA pcsp driver uses a combination of hrtimer/tasklet for the > same purpose. I think we can simplify it, too. Please refer to a patch in > the end of this message. (But not tested yet for the above reason...) The pcsp is a bit special. It's really high frequent irq calls for controlling the beep on/off, thus offloading the whole isn't good. thanks, Takashi