Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp441359ybl; Wed, 11 Dec 2019 22:08:14 -0800 (PST) X-Google-Smtp-Source: APXvYqwUMScom+iZ529qEVFDeaZczmhIksdrWXeDzLIp6ww+p2yxR/spWPr6UE14rdi34EGT0gGl X-Received: by 2002:a9d:f61:: with SMTP id 88mr6056217ott.234.1576130894845; Wed, 11 Dec 2019 22:08:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576130894; cv=none; d=google.com; s=arc-20160816; b=YmIcL2FKirYx1w3oaTW52dpk77iG/Ue32bsdYKKILqjOygnakderxLpKlbMQBlQ1r0 mY3xJYHbnK2OaSVIQknMqX6w6SRyt/cPgWny0MIbbP+tBxaUkin4SVus8UqfPrWg1VUT jBzhw3W8tvxiRsnm1BZOF1Gqu0+g1H+7cGIstabu4gt3k7CsD0n7XxD40p5lvFbYc2gf Mm9BtP7tF60g4kY5KMYV2TUQVcGD3XgaeA1qnBwOdEyJM7c4CtigUPtVJs2sbfO87tsr EeS/nnAn8lEk6K5bQhueytbMJtthrMJpuhJ7T/uy7vhP4p92j6A2/kzn2+IUCT+FttYv +6Kg== 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; bh=LKNTuQlMmTs+25njD2hKeKa7i/Ou5KWrVj0O7mjf77k=; b=vJQKdZF7WxMBD8j1K1s5BqDLdKhyQOnR/c/s30mTzvCpve5MF3/A+n0c55bPkqNLGQ i8P0HkLA+I6bkybcVTTBW24x/4Rf0l+/sT7Pf2suAzU43zYzct7K+GCBwPCW51amTfJG sG/BzLAlGySKA+fC6iJjk2QqImeaqVhKiZqYVRdLUpUEt1W8txTJt3KaLGSrHsxmZCo4 H1nfkK7yvEyLi6tqJuzEIRZsnquQk4b6+T4ToCkHd9ZhNAB9CajjWAyjA6QN5O+muUoO hoPXHllJChPNQrMfblhsLKGgZsKlvRRzLPkNVxTp+5BdiLuGs02MCvR4vljgyps03WKR yaHg== 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 c13si2738010otd.109.2019.12.11.22.08.00; Wed, 11 Dec 2019 22:08:14 -0800 (PST) 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 S1727891AbfLLGHK (ORCPT + 99 others); Thu, 12 Dec 2019 01:07:10 -0500 Received: from mx2.suse.de ([195.135.220.15]:33802 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726784AbfLLGHJ (ORCPT ); Thu, 12 Dec 2019 01:07:09 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id CAD5EB2C2; Thu, 12 Dec 2019 06:07:07 +0000 (UTC) Subject: Re: [PATCH v3 4/4] xen-blkback: support dynamic unbind/bind To: Paul Durrant , xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Konrad Rzeszutek Wilk , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , Jens Axboe , Boris Ostrovsky , Stefano Stabellini References: <20191211152956.5168-1-pdurrant@amazon.com> <20191211152956.5168-5-pdurrant@amazon.com> From: =?UTF-8?B?SsO8cmdlbiBHcm/Dnw==?= Message-ID: Date: Thu, 12 Dec 2019 07:07:06 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.1 MIME-Version: 1.0 In-Reply-To: <20191211152956.5168-5-pdurrant@amazon.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11.12.19 16:29, Paul Durrant wrote: > By simply re-attaching to shared rings during connect_ring() rather than > assuming they are freshly allocated (i.e assuming the counters are zero) > it is possible for vbd instances to be unbound and re-bound from and to > (respectively) a running guest. > > This has been tested by running: > > while true; > do fio --name=randwrite --ioengine=libaio --iodepth=16 \ > --rw=randwrite --bs=4k --direct=1 --size=1G --verify=crc32; > done > > in a PV guest whilst running: > > while true; > do echo vbd-$DOMID-$VBD >unbind; > echo unbound; > sleep 5; > echo vbd-$DOMID-$VBD >bind; > echo bound; > sleep 3; > done > > in dom0 from /sys/bus/xen-backend/drivers/vbd to continuously unbind and > re-bind its system disk image. > > This is a highly useful feature for a backend module as it allows it to be > unloaded and re-loaded (i.e. updated) without requiring domUs to be halted. > This was also tested by running: > > while true; > do echo vbd-$DOMID-$VBD >unbind; > echo unbound; > sleep 5; > rmmod xen-blkback; > echo unloaded; > sleep 1; > modprobe xen-blkback; > echo bound; > cd $(pwd); > sleep 3; > done > > in dom0 whilst running the same loop as above in the (single) PV guest. > > Some (less stressful) testing has also been done using a Windows HVM guest > with the latest 9.0 PV drivers installed. > > Signed-off-by: Paul Durrant Reviewed-by: Juergen Gross Juergen