Received: by 10.192.165.148 with SMTP id m20csp4300378imm; Mon, 23 Apr 2018 23:51:02 -0700 (PDT) X-Google-Smtp-Source: AIpwx48n/llwDf8wZor2RvLE7n0qYQez99LBJhu8Uk+X3xNqXQNF09tli0rqhpitIdtWRKFxCQNo X-Received: by 10.167.134.80 with SMTP id a16mr22962651pfo.172.1524552662351; Mon, 23 Apr 2018 23:51:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524552662; cv=none; d=google.com; s=arc-20160816; b=FyS1B85K9AQt8uDaWt9QaaTXPRlIRAW6JM2ScM0axhA2X5YdC5nyBGr1/TCf4xu0Ap Xw9CLaxCUxilB+1FkIlUMh6Pvm70JxzFwVf5+K1tIRdafc5cY8nL04EmVTFAnSV6ojk8 4XTOgvXhK5Mrj6CSVRnRWVUuMCM1ybwVbg5UOqQV/QIgR9KIoi8AHe7sP6FBxFpp4as2 pRhI/GmcOEYjiBodf0qQOx2CGerIwj3OndHZLTxYQr6gAzYZ+1dOWopwnr4fMxHK13mb 3z+hb1nemweMQnT98jAK1Nc419NSVJuxOwSH3vqvI5uRlPJO8fCtc3MMXM3QuzXmWBga 0R2Q== 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=k4KCB36sSwEcdguTd+W1YwlPhTc10W7c6YQSjOblzqA=; b=G78Rcb/kKmQeyJje/7c4XGaWms4eqkVxtMrmgxRALjbILM1Y9x0eInBZUnMh3FAmi3 arWdprwTZggWDXdrnW6zagQFB3DROTguDLYhQmNNUCYTFHmZn9bZl9TrGnNrDRlIR5Nm V20QeHQsyVWiEV8TvOXhZeJnZliTXn0f7fuSBOWOlL+Chn0dDo5c4QSLGPgBhrXin9lI ocCzJPZjO0bQZslBt6LZuSRx3QOsu7t8Q5aySqOyPvXx72jGy4pWoiwLSAGWBG2sIJD2 rQ1Jo3K94GEWEsiZOk0S/M8B/5H0IqebA+jyY62xiInFRMOK23HQmT0zqwDUFsvQpwuR TJlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=ZHdHgfvi; 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 a21si1799908pfo.31.2018.04.23.23.50.48; Mon, 23 Apr 2018 23:51:02 -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=ZHdHgfvi; 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 S1756251AbeDXGIw (ORCPT + 99 others); Tue, 24 Apr 2018 02:08:52 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:50872 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755919AbeDXGIu (ORCPT ); Tue, 24 Apr 2018 02:08:50 -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 w3O66AcG025438; Tue, 24 Apr 2018 06:08:44 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=k4KCB36sSwEcdguTd+W1YwlPhTc10W7c6YQSjOblzqA=; b=ZHdHgfviioU3pBtr52xufuWTgQPJSOIdKzOhz0sAL/hnffiFwxv66A8Tn7kbBHnE9vNs atilyLqCO7bIqhmPwygDMZkbJ2JLgCX+9i9rgMWP1jWNR6W5U5bkluRUFVGzPCkavX9W UH9YMbBcQAVWtE45NkIG3tlcqnMPG+KyVQqL/h2+3iyIfKLD7rxG44vUWUs5N8eFzW8g uLvGdFKngl4ffFpS/RpJTruslY8dUatya1IKaOW+XVznO6p5JlhGR/c5rsTB13NEw/qt ihppNNT47Oxm89Q4Cg74WVGQwGlGSX5fnfcYWo59DDIXYmxYpSxvbyBH3q2sOgmNxc+R 0Q== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2130.oracle.com with ESMTP id 2hfvrbrce3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 24 Apr 2018 06:08:44 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w3O68hB0026033 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 24 Apr 2018 06:08:43 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w3O68gkB013232; Tue, 24 Apr 2018 06:08:42 GMT Received: from [10.182.69.93] (/10.182.69.93) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 23 Apr 2018 23:08:42 -0700 Subject: Re: [Xen-devel] [RFC 0/2] To introduce xenwatch multithreading (xen mtwatch) To: Juergen Gross References: <1523100355-27647-1-git-send-email-dongli.zhang@oracle.com> <20180423140911.bihiwfwtlneobgzd@citrix.com> <6c379249-886d-76ee-db9c-942967b23d80@oracle.com> <9a91b19a-5556-f1ea-92d5-29f2baa0ccd5@oracle.com> <0280ae73-fd29-33a6-e4d5-8c83a8c2a5d7@suse.com> Cc: Wei Liu , ian.jackson@eu.citrix.com, linux-kernel@vger.kernel.org, srinivas.eeda@oracle.com, xen-devel@lists.xenproject.org, boris.ostrovsky@oracle.com, Joao Martins From: Dongli Zhang Message-ID: <1685df30-d31c-0c1b-40a4-b3282fbcd609@oracle.com> Date: Tue, 24 Apr 2018 14:10:40 +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: <0280ae73-fd29-33a6-e4d5-8c83a8c2a5d7@suse.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8872 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-1804240062 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/24/2018 02:03 PM, Juergen Gross wrote: > On 24/04/18 07:52, Dongli Zhang wrote: >> Hi Juergen, >> >> On 04/24/2018 01:22 PM, Juergen Gross wrote: >>> On 24/04/18 01:55, Dongli Zhang wrote: >>>> Hi Wei, >>>> >>>> On 04/23/2018 10:09 PM, Wei Liu wrote: >>>>> On Sat, Apr 07, 2018 at 07:25:53PM +0800, Dongli Zhang wrote: >>>>>> About per-domU xenwatch thread create/destroy, a new type of xenstore node is >>>>>> introduced: '/local/domain/0/mtwatch/'. >>>>>> >>>>>> Suppose the new domid id 7. During the domU (domid=7) creation, the xen >>>>>> toolstack writes '/local/domain/0/mtwatch/7' to xenstore before the insertion >>>>>> of '/local/domain/7'. When the domid=7 is destroyed, the last xenstore >>>>>> operation by xen toolstack is to remove '/local/domain/0/mtwatch/7'. >>>>>> >>>>>> The dom0 kernel subscribes a watch at node '/local/domain/0/mtwatch'. Kernel >>>>>> thread [xen-mtwatch-7] is created when '/local/domain/0/mtwatch/7' is inserted, >>>>>> while this kernel thread is destroyed when the corresponding xenstore node is >>>>>> removed. >>>>> >>>>> Instead of inventing yet another node, can you not watch /local/domain >>>>> directly? >>>> >>>> Would you like to watch at /local/domain directly? Or is your question "is there >>>> any other way to not watch at /local/domain, while no extra xenstore node will >>>> be introduced"? >>>> >>>> Actually, the first prototype of this idea was to watch at /local/domain >>>> directly to get aware of the domU create/destroy, so that xen toolstack will not >>>> get involved. Joao Martins (CCed) had a concern on the performance as watching >>>> at /local/domain would lead to large amount of xenwatch events. >>> >>> That's what the special watches "@introduceDomain" and "@releaseDomain" >>> are meant for. >> >> I used to consider to watch at "@introduceDomain". However, there is no domain >> information appended with "@introduceDomain" and it is still required for dom0 >> kernel to proactively confirm who is created. > > That isn't too hard, right? You just need to read /local/domain to get > the list of its children and look for new domains there. You are right. I will try to limit the modification within linux kernel, and try to not dirty xen toolstack. Thank you very much for the suggestion. Dongli Zhang