Received: by 10.213.65.68 with SMTP id h4csp3689207imn; Tue, 10 Apr 2018 03:08:43 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+NtobAWHrH52P3Ab96bNrfANw9ft4gu8vS+WaUopCWvSwMgl5ocbKFeTt60ri5afA9yzg7 X-Received: by 2002:a17:902:748a:: with SMTP id h10-v6mr8976849pll.160.1523354923547; Tue, 10 Apr 2018 03:08:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523354923; cv=none; d=google.com; s=arc-20160816; b=MeGHxXVKauqY/X1+uuMG6bfZwtOYsnFadUgBr/AHfExsu+mCTmxpLiZT24BbCdcQ1j 7P2PItUaXDSkdQxVqM9R7yeGsZqCgsgNsPBl/ySf9NoX0a+hA+R7fpcQQ900NYUy/xF/ c709t1YiRsy/espPPPaHdpCt1XHQ8SFq2kTwZgRYQguRHnh5WEOyz9fGk9eu4rXSfce3 LJHIr9+kX1ne8XR4Mc9vJMqQkdi7DtFSk7tETg4/qwQbdCFTS1QCZ10FFzDErNsqo/4U 6CgYkyyzULAK2RzlvMI2tu2qViAiZvNkkj/+h12q+dGDSUcqu+vZQA9PX8s8M9TzC8Fm 8Ukw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=xSoaOHoanOOZDnSuYG/hRfDKqiKWyVJhlfjUvAAXYho=; b=bl0c05gAHxJyiWT/LuW2jwu9yYWHxBgyMnyNcHEq/tezvaFGwGNCte3Y7sqA8Y0KKi lbF2qI6zLDDHfdPnAayaYKjE+93D1zym7Hf9nnB55hD4XEtbpdF0Wqn0dm4LyC4PyGvM sWeQAGuqQg8tZ3UGIDs1dMXSrGzqffS/Vrhd59XFDVJzItSMUU5KvuAZIfcmRlRqh1IN fwn2q9RfTvSLin5fhmBNnaKzoiyaYDJf1CyyRkWFm/HITYkKXkZLcEGZcBxirHYgLAuV FCvhiPnw/WeafGNbKGUesgpg3bjWUKHKC+f4iLGQJuzi3Kprz41jDsdJzB8Fvj5agWwz mONg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=c4dKuUIS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b14-v6si2274807pll.116.2018.04.10.03.08.06; Tue, 10 Apr 2018 03:08:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=c4dKuUIS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752394AbeDJKE4 (ORCPT + 99 others); Tue, 10 Apr 2018 06:04:56 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:40069 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752147AbeDJKEy (ORCPT ); Tue, 10 Apr 2018 06:04:54 -0400 Received: by mail-lf0-f68.google.com with SMTP id e5-v6so10799135lfb.7 for ; Tue, 10 Apr 2018 03:04:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=xSoaOHoanOOZDnSuYG/hRfDKqiKWyVJhlfjUvAAXYho=; b=c4dKuUISMG7r52uWlo/WgZnLptZrfOmIUuMTrf7nUi5RMq4sBBINnI/J53hM9Ojllz GxvxB7yEP4i8ndCbXXBst5GC4o/oX5cs/1o4++0CGc8k63DVQcFmvdt4YqvpUPjJM/+D uO2H/JfqDt87GMKa4dmHv+8XhkFWhf0j4tV7Tm5vzoMnmb3Zu45645IT2x+QRfXB4J9W x09ytSNfTZYaRg2DUl0yJ8S8XGbSf1ulUm1fdsJizmLryHGVCCH0zJZ3N4maz9PGFQ+v PGfCcD4oSLch3hCf489o9JQjPzhckwRTqwGtASYiXO9Pjm5L9U4gYl05kH+5gRtrIpO8 oweQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=xSoaOHoanOOZDnSuYG/hRfDKqiKWyVJhlfjUvAAXYho=; b=lJlMUqFOhTiMUMSom/sNvixZ8SB/BVm6TeZUrwk3VuCixI+dMfWM2jjs0Hgj6+yUo8 NZgUKY9mWH/oLWAOerOKx1Pbf8VNbJ4euZkD778UXHdU0NxYyBXVmIaukUxC19/zotHc zrZgl8PkPjacwOV/Gi0xRZ4EfXqAzHrA/ee2Wu/07/sLALHIfFz2Nqo+uzXMxOQb42Z8 Z1040r2jGvqrtRorOLF4neJZ9y9sfATkHptAXcec5UImqt/dQ3EHSlZSct8/cWjQoXX2 GsN4vBd0uTmamVh8n9z2LxZFlbzcbDxInyTZeV93cETq1r8zjztJXEjVcYzizLhICOtX NnOA== X-Gm-Message-State: ALQs6tAXnmZt1SCnnL16TeCFSnkZuzapzwHWdxTWUOxY8dYYYLVRh1qR e33lMr4RVbC9ZXjPmOzt48B78KV9f4U= X-Received: by 10.46.18.150 with SMTP id 22mr24407644ljs.120.1523354693536; Tue, 10 Apr 2018 03:04:53 -0700 (PDT) Received: from [10.17.182.9] (ll-74.141.223.85.sovam.net.ua. [85.223.141.74]) by smtp.gmail.com with ESMTPSA id l195-v6sm95844lfl.7.2018.04.10.03.04.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Apr 2018 03:04:52 -0700 (PDT) Subject: Re: [RFC,v2,9/9] hyper_dmabuf: threaded interrupt in Xen-backend To: Dongwon Kim , linux-kernel@vger.kernel.org, linaro-mm-sig@lists.linaro.org, xen-devel@lists.xenproject.org Cc: dri-devel@lists.freedesktop.org, mateuszx.potrola@intel.com References: <20180214015008.9513-10-dongwon.kim@intel.com> From: Oleksandr Andrushchenko Message-ID: Date: Tue, 10 Apr 2018 13:04:51 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180214015008.9513-10-dongwon.kim@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/14/2018 03:50 AM, Dongwon Kim wrote: > Use threaded interrupt intead of regular one because most part of ISR > is time-critical and possibly sleeps > > Signed-off-by: Dongwon Kim > --- > .../hyper_dmabuf/backends/xen/hyper_dmabuf_xen_comm.c | 19 +++++++++++-------- > 1 file changed, 11 insertions(+), 8 deletions(-) > > diff --git a/drivers/dma-buf/hyper_dmabuf/backends/xen/hyper_dmabuf_xen_comm.c b/drivers/dma-buf/hyper_dmabuf/backends/xen/hyper_dmabuf_xen_comm.c > index 30bc4b6304ac..65af5ddfb2d7 100644 > --- a/drivers/dma-buf/hyper_dmabuf/backends/xen/hyper_dmabuf_xen_comm.c > +++ b/drivers/dma-buf/hyper_dmabuf/backends/xen/hyper_dmabuf_xen_comm.c > @@ -332,11 +332,14 @@ int xen_be_init_tx_rbuf(int domid) > } > > /* setting up interrupt */ > - ret = bind_evtchn_to_irqhandler(alloc_unbound.port, > - front_ring_isr, 0, > - NULL, (void *) ring_info); > + ring_info->irq = bind_evtchn_to_irq(alloc_unbound.port); > > - if (ret < 0) { > + ret = request_threaded_irq(ring_info->irq, > + NULL, > + front_ring_isr, > + IRQF_ONESHOT, NULL, ring_info); > + Why don't you go with threaded IRQ from the beginning and change it in the patch #9? > + if (ret != 0) { > dev_err(hy_drv_priv->dev, > "Failed to setup event channel\n"); > close.port = alloc_unbound.port; > @@ -348,7 +351,6 @@ int xen_be_init_tx_rbuf(int domid) > } > > ring_info->rdomain = domid; > - ring_info->irq = ret; > ring_info->port = alloc_unbound.port; > > mutex_init(&ring_info->lock); > @@ -535,9 +537,10 @@ int xen_be_init_rx_rbuf(int domid) > if (!xen_comm_find_tx_ring(domid)) > ret = xen_be_init_tx_rbuf(domid); > > - ret = request_irq(ring_info->irq, > - back_ring_isr, 0, > - NULL, (void *)ring_info); > + ret = request_threaded_irq(ring_info->irq, > + NULL, > + back_ring_isr, IRQF_ONESHOT, > + NULL, (void *)ring_info); > Ditto > return ret; > > >