Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp2975841pxb; Tue, 12 Jan 2021 03:21:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJyxJ0P34DGC1ERhbYLcCVJGmNsJkNKdNmit4qac4okpmTTojxfy24itsoS6Fiy2fGRTDlzG X-Received: by 2002:a17:906:d0c2:: with SMTP id bq2mr2838246ejb.1.1610450468312; Tue, 12 Jan 2021 03:21:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610450468; cv=none; d=google.com; s=arc-20160816; b=sbH5etBgLJjGQ3MTtfK9PSdXSi1SibY6+81w9oZjC7P8oTFzxhSvFPQQzBTt4SH7rA asCFz2/UnJeXMv7PrbIH9qEcxE7eOAh9Yd+IyDsePg72KaFjn79Sh/TcYMX2ieiwMNlI 8WVUndyfdzssYmXiIQalNIKmZdXOKgjyEOLSEeGdSan1lQRFTcQGNmdcRvluQ1HJBaUY 6rasRoqu5K1tiNCxHpPTRtpC3TgjpV0qgvgr11b77sRybPjzmVKig6HICIgWwQnTqORm eTEANheFa49wMnRBw21Kr0Rudx36jICP7mgG+IEqDJ+e223d7ZzEcCA6QLKNoDHuh3Xy 7HeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=dIU4hRkPDrKIDejZ/iop6hx19uC65e3nUwWPk6KJBLk=; b=OetmZ5yCV7LlkoY7etCLzHHbF4YMDvgch7VHrE5DuKgVhXYwXoBrCX34JTiqGOWy/K UR+3UmkW1xnNFz7JMw7CfDlwGSvGWIPqzOZP3QNd1ux0L15668wZsTFaW7//Rp97UPa/ XxQufA56x8dv2dMWgHmZC6IE5o7QO9E1hM9qR7nZKn3g775ZANn3EaypCsRu36yZIMvS CkPx6zG0EL/yjaUhdqSbn0e99QTU2X59rh6dn26DsLFgZeOuyWKMEZ+eoKhLoGZOxsMR NCmvlmXSnHaBRHQ+UZgabgNOYvrz+hyaGCr0w3RBZS3rn6NCN7flN40j65AL5fsT8I3P +S8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b7si1183556edr.549.2021.01.12.03.20.44; Tue, 12 Jan 2021 03:21:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730731AbhALGGN (ORCPT + 99 others); Tue, 12 Jan 2021 01:06:13 -0500 Received: from mga18.intel.com ([134.134.136.126]:62078 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727742AbhALGGM (ORCPT ); Tue, 12 Jan 2021 01:06:12 -0500 IronPort-SDR: rSNf3gADql83cgqRjAAXayeqtz63BuVYgvmJZUhYhlE5BEGy6b8tFJ6Y01KWlGCfBHyJGRWMxb Zv5ij197lcAw== X-IronPort-AV: E=McAfee;i="6000,8403,9861"; a="165670069" X-IronPort-AV: E=Sophos;i="5.79,340,1602572400"; d="scan'208";a="165670069" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2021 22:05:32 -0800 IronPort-SDR: k91NCzqCPw+ib8MsM69HogY7wGpnG0aOIekctd4VJJy6zeh5aZ/Z2hYcMkFzGn7Ek/TFqdslQd KPhuppKijTtQ== X-IronPort-AV: E=Sophos;i="5.79,340,1602572400"; d="scan'208";a="381295354" Received: from shuo-intel.sh.intel.com (HELO localhost) ([10.239.154.30]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2021 22:05:29 -0800 Date: Tue, 12 Jan 2021 14:05:27 +0800 From: Shuo A Liu To: Davidlohr Bueso Cc: , , Greg Kroah-Hartman , "H . Peter Anvin" , "Thomas Gleixner" , Ingo Molnar , "Borislav Petkov" , Yu Wang , Reinette Chatre , Zhi Wang , Zhenyu Wang Subject: Re: [PATCH v7 09/18] virt: acrn: Introduce I/O request management Message-ID: <20210112060527.GF22447@shuo-intel.sh.intel.com> References: <20210106075055.47226-1-shuo.a.liu@intel.com> <20210106075055.47226-10-shuo.a.liu@intel.com> <20210111215219.l44yfpyqh4m2mcbl@offworld> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20210111215219.l44yfpyqh4m2mcbl@offworld> User-Agent: Mutt/1.8.3 (2017-05-23) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 11.Jan'21 at 13:52:19 -0800, Davidlohr Bueso wrote: >On Wed, 06 Jan 2021, shuo.a.liu@intel.com wrote: >>The processing flow of I/O requests are listed as following: >> >>a) The I/O handler of the hypervisor will fill an I/O request with >> PENDING state when a trapped I/O access happens in a User VM. >>b) The hypervisor makes an upcall, which is a notification interrupt, to >> the Service VM. >>c) The upcall handler schedules a tasklet to dispatch I/O requests. >>d) The tasklet looks for the PENDING I/O requests, assigns them to >> different registered clients based on the address of the I/O accesses, >> updates their state to PROCESSING, and notifies the corresponding >> client to handle. > >Hmm so tasklets are deprecated (and have been for a while) and it's sad >to see incoming new users in modern Linux. This wouldn't be the first one, >however. We should be _removing_ users, not adding... In addition, this >expands the whole tasklet_disable/enable() hacks. Sorry, i had not noticed that. > >Could this not be done in process context instead? It could be. The original consideration with tasklet was more about performance as the I/O requests dispatching is a hot code path. I think irq thread has little performance impact? I can have a try to convert the tasklet to irq thread. Thanks shuo