Received: by 10.213.65.68 with SMTP id h4csp687325imn; Sat, 7 Apr 2018 07:25:50 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+9pDyP81MG5xcH6h/oTz0ZR9RZHg9WtlJ2BDy+B0m5iMxDdsWsH7fJs6Q3f6HRBK3MEyyv X-Received: by 2002:a17:902:28e3:: with SMTP id f90-v6mr31622399plb.250.1523111150053; Sat, 07 Apr 2018 07:25:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523111150; cv=none; d=google.com; s=arc-20160816; b=NOCD1lse1BgBHzAGNjsDhvDXnvhYduJlhi9+rPlF/UOLz9MsPzJLOv4+V2mLHDKqWk QNlloa4m84ukANg8T9cgSf6aHgY+LnV6IK5MLqjA26+3oWOBymq6I8hmP8vTLD6Oj4vb CCBxDx8C5akZHC5uiFiBHItfaWH6rabmDxYGQethX8LEXnMhAB2NEldfuTInObFkjOhJ IXGsAj70zvFUc8ZguQ7HHu4Bn+qEEIvW9nOaxhwL0W1DbxxygHeMua94HJk+tvlAGjsf QRRoAkxomq2hmNOULyYp7EHzY0FQ+9ciq3aC1rKWXJC4lop9JbJg7V4w2kBJf3IX4YGm rhAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:dkim-signature:arc-authentication-results; bh=S5nKjPdcnjyY3VgcKwhGu3fcHydi9h3kUGfn44QHlp8=; b=ybUeQ+X7iWvY0yc+v8eyEkotDpoL1F+B7Cj9C9eMZDe5kRFhjqZxkGTDCns/O+FozB ZVmNpNJ+UFRGo6o9XDJWNW96tUdCINLjHBmrbsmxV90gXTL1jS5/sdOwJY1duIb5WHK7 vowvvCJbwuUCjQwscSZSjB3xhyRxHnts3RaIjJ5TAMYtohSRPmZ5DF2rHcAYqEgfS2yf b9miwiBhgzHkp5zfuOHA59DKm0WdEBXlLjxNgR1iPCaQXTXy8n6x4EFVBSXeyxndA/yp p8F1hjzT1d6R+0/c1FnX1H8Hqh8GleKyk6yBYm9xWQRfbQ6xtoC8MzYoAM02C+u0Pzn0 CRHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=HWpnI/Wc; 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=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k14si8418983pgt.32.2018.04.07.07.25.12; Sat, 07 Apr 2018 07:25:49 -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=@oracle.com header.s=corp-2017-10-26 header.b=HWpnI/Wc; 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=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752037AbeDGOWf (ORCPT + 99 others); Sat, 7 Apr 2018 10:22:35 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:38726 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751681AbeDGOWd (ORCPT ); Sat, 7 Apr 2018 10:22:33 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w37E4LJW111277; Sat, 7 Apr 2018 14:22:26 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : references : cc : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=S5nKjPdcnjyY3VgcKwhGu3fcHydi9h3kUGfn44QHlp8=; b=HWpnI/WciNaNxX9UInV5ih6iWG4VBlXqNPqlmIaHH50w6odzhGyDBoILB1vRSla9UMZc ALpep+MdPXl2BQcXzE2MXKrb4zUOYYeN2vUUUcFnSzZT57rzV9SelXdYMVXPwux7Pxaw yycX7MRBtFxrlva0xSH1IQc+i5u/L/eOiqrSzJPclMaTWoWGoqHCTeUUusE8RmpxZjgv NEzyC93TvaZkeaUEbJRVr7cKH26TtK9LFgoNoY+hkmjt+VTADCTlUoYZPDSV8xUVCfiM npDYu4NX9wT0nlPi7hx+a9MHqs+lvko9aoeh5YrzDqVUifB8Bu/VKTujrDlOaLOCqn4l rA== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2130.oracle.com with ESMTP id 2h6ne70tcq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 07 Apr 2018 14:22:26 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w37EMPkr018914 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 7 Apr 2018 14:22:25 GMT Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w37EMOeF009738; Sat, 7 Apr 2018 14:22:24 GMT Received: from [10.191.0.200] (/10.191.0.200) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 07 Apr 2018 07:22:23 -0700 Subject: Re: [Xen-devel] [RFC 0/2] To introduce xenwatch multithreading (xen mtwatch) To: Juergen Gross , xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org References: <1523100355-27647-1-git-send-email-dongli.zhang@oracle.com> <5c8c5c98-c16f-2df4-8582-90b5facc9f54@suse.com> Cc: wei.liu2@citrix.com, boris.ostrovsky@oracle.com, ian.jackson@eu.citrix.com, srinivas.eeda@oracle.com From: Dongli Zhang Message-ID: <6754eb61-15c0-3eac-d509-b81a5957cb82@oracle.com> Date: Sat, 7 Apr 2018 22:22:16 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <5c8c5c98-c16f-2df4-8582-90b5facc9f54@suse.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8855 signatures=668698 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1804070155 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Juergen, On 04/07/2018 07:59 PM, Juergen Gross wrote: > On 07/04/18 13:25, Dongli Zhang wrote: >> This is to introduce "xenwatch multithreading" (or "multithreaded xenwatch", >> abbreviated as 'mtwatch'). The implementation of xen mtwatch involves below >> components: >> >> * dom0 linux kernel >> * xen toolstack >> >> Here are what the RFC is going to discuss: >> >> - what is the problem >> - what is the objective >> - what is the solution > > Instead of creating one thread per domU, wouldn't it make much more > sense to use another mechanism, e.g. a workqueue, to deliver the > watch events? This would be one central place, wouldn't need any > changes in Xen tools or complex mechanisms to select the correct > thread, save resources, and domUs would benefit, too. I think the xenwatch events of the same domU are expected to be processed in order. I do not think we are able to guarantee the events of same domU are processed in order with a central workqueue (unless it is an ordered workqueue). Suppose an event callback function is stalled, we expected all following events belong to the same domU are delayed until there is workaround/solution to unblock the stalled function. For instance, as mentioned in below mailing list archive, once the NIC is reset, all in-flight packets are flushed and the stalled callback function moves forward and complete. As all events (especially the events belong to the same domU) are still queued, the pv device backend can disconnect correctly and successfully. With a central workqueue, the following events belong to the same domU are already processed so that the pv device backend may not disconnect successfully. https://lists.xenproject.org/archives/html/xen-devel/2016-06/msg00195.html Dongli Zhang