Received: by 10.192.165.148 with SMTP id m20csp4288213imm; Mon, 23 Apr 2018 23:33:30 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/9onu/khmj3zzxfOUU1yjE3Q6Tx3SgDo9u4pwNs1Nm5kh+peeUjuS+BTC/+Js7zKA71pNh X-Received: by 2002:a17:902:145:: with SMTP id 63-v6mr23723295plb.332.1524551610808; Mon, 23 Apr 2018 23:33:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524551610; cv=none; d=google.com; s=arc-20160816; b=Lq+iZFaA711JAktiVD7uNui3siOhHbvb+xIxrYZnKzfyZaR9PqAz9MAxQbiXXWNWiE n0m4a4NfT6DbSyqyZ5vnO22dcCtlX32QvjQWDlm7WITxsXR1RUXcbpoyXq60aY++V0aB o/5EQPXsSKLSOg5MzCxFa90ocIP/zE9WyGZimEsJIcy4PdJ05TWIJpULtZyWO3/x7vZr nVNuNUW0m+NstroX/ky3iT5i/qOudzqOwT+9vsHbP6itQdvoFvGKc9ZbOxER9g++0+9n 6FjjRtmPS9UWPFrr7S6ZdiAEIzaK6iciGxQsd7e2fxDzoEyhvX5TYX4Tx+UDtJy0PEes kNDg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=cUXeKRbHktg/e7Roir2lX9slsIk+ws9hWQVlDpceg5k=; b=L1YZt7daIZn6F5+4AWrT7t45jmIVI2xuvSSx5Blk5TsiZwSEZDrecatq0jAsKnmFzC 7ezzIAK3zJzgbjMNkPyb9cZvbzINRAWyu4AB580A1mgVO5J26uHsnk4daBuaQvrR1uWX OnvgUUFKXVolmtMn5AFsJbFXzQVIeqtDak1xJnNB/8is/gxitHHssm0+Rxi7cNWc1agv D81QLpxWrWoHk9/CJoYAV3e1C6vdoKVqB9z9eOINbxGGyvSAAbiLAFSwHYJGCri/3Fp9 qOviwyaRiptwHJPuaKvzTADbqAr5B+y/mulVs2pAWfBx9CXPvemlTQltwSofvYHbutcK GIeA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y6si12251870pfe.248.2018.04.23.23.33.16; Mon, 23 Apr 2018 23:33:30 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755917AbeDXGXn (ORCPT + 99 others); Tue, 24 Apr 2018 02:23:43 -0400 Received: from mx2.suse.de ([195.135.220.15]:46602 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751312AbeDXGXk (ORCPT ); Tue, 24 Apr 2018 02:23:40 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 72994AC5B; Tue, 24 Apr 2018 06:23:39 +0000 (UTC) Subject: Re: [Xen-devel] [RFC 0/2] To introduce xenwatch multithreading (xen mtwatch) To: Dongli Zhang 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 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> <1685df30-d31c-0c1b-40a4-b3282fbcd609@oracle.com> From: Juergen Gross Message-ID: Date: Tue, 24 Apr 2018 08:23:37 +0200 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: <1685df30-d31c-0c1b-40a4-b3282fbcd609@oracle.com> Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 24/04/18 08:10, Dongli Zhang wrote: > > > 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. When going that route you should extend xenbus_directory() in the kernel to use XS_DIRECTORY_PART in case XS_DIRECTORY returns E2BIG (see xs_directory() in Xen's tools/xenstore/xs.c ). This will enable the kernel to support more than about 1000 domains. Juergen