From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0BA22C433E2 for ; Wed, 2 Sep 2020 09:15:35 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6DC1B20773 for ; Wed, 2 Sep 2020 09:15:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="MwP2hVI3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6DC1B20773 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id E10521800; Wed, 2 Sep 2020 11:14:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E10521800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1599038132; bh=WFE2+mkxeGqEl7ch4CaNDxi8in0HAE85AOpBrURLxmc=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=MwP2hVI31KbZzooEBwhSYf/jfL2vYMtMuWWnS6rQ964EgJaNMvs8fC9spv8pjRA7J y/DAsYB9hWYa94sRyccfol4ENbkXUDSwtQXgOX3qo2otojvgMljBlFoNoZc0tYxS/H //6yqHPI2jvbWAb8LwKp8Dcn7mwnbqBjmpGw/wo8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 7E170F80212; Wed, 2 Sep 2020 11:14:42 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id CD35AF8024A; Wed, 2 Sep 2020 11:14:41 +0200 (CEST) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 39A75F801DA for ; Wed, 2 Sep 2020 11:14:38 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 39A75F801DA X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 15748AD2F; Wed, 2 Sep 2020 09:14:39 +0000 (UTC) Date: Wed, 02 Sep 2020 11:14:37 +0200 Message-ID: From: Takashi Iwai To: Takashi Sakamoto Subject: Re: [PATCH v2 02/10] ALSA: firewire: convert tasklets to use new tasklet_setup() API In-Reply-To: <20200902084443.GA791585@workstation> References: <20200902040221.354941-1-allen.lkml@gmail.com> <20200902040221.354941-3-allen.lkml@gmail.com> <20200902084443.GA791585@workstation> 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.3 (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 Cc: alsa-devel@alsa-project.org, Romain Perier , timur@kernel.org, Xiubo.Lee@gmail.com, clemens@ladisch.de, tiwai@suse.com, Allen Pais , nicoleotsuka@gmail.com, broonie@kernel.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Wed, 02 Sep 2020 10:44:43 +0200, Takashi Sakamoto wrote: > > To Iwai-san, > > I'm review your patch in 'test/kill-tasklet' branch in sound.git[1]. > Although I agree with the direction to obsolete tasklet usage with > workqueue, 'in_interrupt()' helper function is used in two lines in > 'sound/firewire/amdtp-stream.c' since it's convenient to distinguish > running context (any softirq or user task). We need enough care of > the cases about which below two patches mention: > > * 1dba9db0eaa6 ('ALSA: firewire-lib: permit to flush queued packets > only in process context for better PCM period granularity') > * 4a9bfafc64f4 ('ALSA: firewire-lib: Fix stall of process context > at packet error) > > As long as I know, we have no helper function to distinguish workqueue > task from user task. The simple replacement is not good way in the case. Thanks for pointing this out, it was indeed an overlook. We can use current_work() to check whether the current task comes from the dedicated work or not, e.g. if (current_work() == &myobject->some_work) its_from_my_work(); Takashi