Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4034915ybl; Mon, 9 Dec 2019 04:27:01 -0800 (PST) X-Google-Smtp-Source: APXvYqz4V5RZFSsZH7xscUWzEq5UFq8bdawjML42wDvhEZ+lP9smuTi4CT8wxt/rfilTCcEazElM X-Received: by 2002:aca:4ad1:: with SMTP id x200mr17129563oia.104.1575894421441; Mon, 09 Dec 2019 04:27:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575894421; cv=none; d=google.com; s=arc-20160816; b=HYTW9YCtFehoTQnpieBEmapiqAXYYcPGjgJekBliZZVfe9cNw0iaqcjPAz5L5Gm23G gcmncxhNS0BSZfW1DmaZaEFRpbPxfo6qmpOX4JoZpVsiMb/ctf7roQkWSFPX69qNU+m3 r5qsZ7wGNavR8pJasEKrYc5/wp1iH5LX3JOFVbt3WvHZ4mVLp89Li4IIMmyGuoZsf2up CQqIj+DorJcCn+OpG8T9mm47q6MbOZt0NPPsKWUwcRUOgUd20taLwYvTaAZH2vrBQeKL kmEsh0S5nHYICAfrhn4e8BUyXcoJARUyxQkzfwLaXEEYQY884sLdhdWwqSW0QY8tFwx1 cA9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:ironport-sdr :dkim-signature; bh=QtCj/9K/AIAe1MY4j6H683/S6PECk5x09PNGWvLJxjo=; b=VzjL4xbjOg1pMtHFFmLjQ0Rz0zhIqx+u3wt09Jfr/I9NS6YuZ/ghQhUNr51M4eU11n nHUqyB46XLSoEO3dN0Pgm+mopq5o5V8SfXZwoWVDRLOVU52zuISMLBzltwZY+nKCVGVB BJNOCSnwExMVXipxkhh2PY6FY2tzOOs4KIxcG3JNbKzywicgmhzSs6iKLMNIwHg7sRt7 MvEmPm4md4HB0USwomLRJWC4kVlMVwSOPxrQt7ON5vNUndc4mAHMeIAOTIkIPrEatG9U d95ysbL8+yQL5yVUmPQBrMoIPW3zxQalsuB0o/4UMeUzyPaELsVKXrk29uwLgmvlPG+8 gfKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=PL0SdY+O; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l17si11802861otn.220.2019.12.09.04.26.49; Mon, 09 Dec 2019 04:27:01 -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; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=PL0SdY+O; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727561AbfLIMY6 (ORCPT + 99 others); Mon, 9 Dec 2019 07:24:58 -0500 Received: from smtp-fw-6002.amazon.com ([52.95.49.90]:55139 "EHLO smtp-fw-6002.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727232AbfLIMY6 (ORCPT ); Mon, 9 Dec 2019 07:24:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1575894297; x=1607430297; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=QtCj/9K/AIAe1MY4j6H683/S6PECk5x09PNGWvLJxjo=; b=PL0SdY+OHxQ8Ytnyo/1c99uW9+Mk0UzY0A7xGUMbV0vMz9ZlcJx/2lsu 2ag5jde6Sj2oIoDxEcDqp5VoldzkUePVTZiqDPoDtNs3Vo99QtC4qvjcZ UcDtm5/f2uTOZOYqN4/sN0JePwT66DYZzA5EiBqWwvgSjrAiLwzdc3DaV w=; IronPort-SDR: NrS8ksYiTcwjYGii7UpFE4VAW7by8aX/VuTQ+PhuPvZE6KtQRtp0I0buCLSe9A3LTZUgdY5CuJ mu5bs2s59l0w== X-IronPort-AV: E=Sophos;i="5.69,294,1571702400"; d="scan'208";a="6802387" Received: from iad6-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-1d-474bcd9f.us-east-1.amazon.com) ([10.124.125.6]) by smtp-border-fw-out-6002.iad6.amazon.com with ESMTP; 09 Dec 2019 12:24:56 +0000 Received: from EX13MTAUEA001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan2.iad.amazon.com [10.40.159.162]) by email-inbound-relay-1d-474bcd9f.us-east-1.amazon.com (Postfix) with ESMTPS id 45F7EA21B5; Mon, 9 Dec 2019 12:24:53 +0000 (UTC) Received: from EX13D32EUC004.ant.amazon.com (10.43.164.121) by EX13MTAUEA001.ant.amazon.com (10.43.61.243) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 9 Dec 2019 12:24:53 +0000 Received: from EX13D32EUC003.ant.amazon.com (10.43.164.24) by EX13D32EUC004.ant.amazon.com (10.43.164.121) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 9 Dec 2019 12:24:50 +0000 Received: from EX13D32EUC003.ant.amazon.com ([10.43.164.24]) by EX13D32EUC003.ant.amazon.com ([10.43.164.24]) with mapi id 15.00.1367.000; Mon, 9 Dec 2019 12:24:49 +0000 From: "Durrant, Paul" To: =?iso-8859-1?Q?Roger_Pau_Monn=E9?= CC: "linux-kernel@vger.kernel.org" , "xen-devel@lists.xenproject.org" , "Konrad Rzeszutek Wilk" , Jens Axboe , Boris Ostrovsky , Juergen Gross , Stefano Stabellini Subject: RE: [PATCH 4/4] xen-blkback: support dynamic unbind/bind Thread-Topic: [PATCH 4/4] xen-blkback: support dynamic unbind/bind Thread-Index: AQHVq3SGozEa3lNeXkCoixgttFczb6exvlMAgAABmYA= Date: Mon, 9 Dec 2019 12:24:49 +0000 Message-ID: <215c57c1096548769aeaaeaa76e7c73b@EX13D32EUC003.ant.amazon.com> References: <20191205140123.3817-1-pdurrant@amazon.com> <20191205140123.3817-5-pdurrant@amazon.com> <20191209121726.GU980@Air-de-Roger> In-Reply-To: <20191209121726.GU980@Air-de-Roger> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.43.164.211] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Roger Pau Monn=E9 > Sent: 09 December 2019 12:17 > To: Durrant, Paul > Cc: linux-kernel@vger.kernel.org; xen-devel@lists.xenproject.org; Konrad > Rzeszutek Wilk ; Jens Axboe ; > Boris Ostrovsky ; Juergen Gross > ; Stefano Stabellini > Subject: Re: [PATCH 4/4] xen-blkback: support dynamic unbind/bind >=20 > On Thu, Dec 05, 2019 at 02:01:23PM +0000, Paul Durrant wrote: > > By simply re-attaching to shared rings during connect_ring() rather tha= n > > 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 dd if=3D/dev/urandom of=3Dtest.img bs=3D1M count=3D1024;= 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 >=20 > So this does unbind blkback while leaving the PV interface as > connected? >=20 Yes, everything is left in place in the frontend. The backend detaches from= the ring, closes its end of the event channels, etc. but the guest can sti= ll send requests which will get serviced when the new backend attaches. Paul