Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3759340pxk; Tue, 22 Sep 2020 01:34:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8RKgyc/Bs/b3wPI5X0O9UdblTPet4Y0J/4kmth7+RITNbb87/KKi6ixypspIT98nUo58X X-Received: by 2002:a17:906:3755:: with SMTP id e21mr3652041ejc.39.1600763675331; Tue, 22 Sep 2020 01:34:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600763675; cv=none; d=google.com; s=arc-20160816; b=OGJR36t9ZKVtMrFYVIPHxAl6sPP/3InReOtWKuyTgOs0EFw00/uGRO1Jr1O5+9zwJf 0ZGjw7AWogA3GlkY4+LFup/BMIQo2EjJBMs5NQ2vLlm/8vJUMf0ayuhfPgKDzJMHDmCY 0HwF9TsoHs1g6uKezPVr0Wzl5o0U2qHyBObOerHEF5cze8R5Zoq637lXO+HVqkV82n9+ t35VLkCX4ROpNebn/xycgAxvhhuFd+C2gydgIzOxrfxP6sGXlS/xowuE+yr8WcL/5QEM OdxPE25Izup1xcdbtR9nbsngkx7mANsgNtrdAimY7R0EZtN6p/NIYP3j8kjsVPtSvNRi x+ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=0+bAyvjF/IRHs0wEyMipvSEvEkOVBr0aJg9baDfrY4k=; b=Csw7pY52tx07FaJ92qrSiyW3Jxja3JsqG1XwRYMtUW4u12KMlz/73l4W/geb9wkJbi KN2l474a6zAn3n2B50az0mV8LtsjEYiplBWvq0ExND2Yc61r7fL9pghUSJ6/irqJRVuK R0Wr1F2mQ+ye+gBtaWa9op6tmCoUTChtJuY3wZMxFLRC64Y+ZuGpSmoiUL/+YxT0FIm8 /nGAm9TLN1+LFYJxrd5OEo6Zu1RgmhxRrMFe5qjGAzmjTcEG9pHjO8oEty9kEv7w4qFN CU2A2chShGJqXSoTDdaQHZ06D7roP4d7YtXod26otvz9ATsq9U7tLbS6+HtLrefzOkFX pjVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=XGm6a7cv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id cx16si10350562edb.575.2020.09.22.01.34.11; Tue, 22 Sep 2020 01:34:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=XGm6a7cv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1729927AbgIVHZF (ORCPT + 99 others); Tue, 22 Sep 2020 03:25:05 -0400 Received: from smtp-fw-9101.amazon.com ([207.171.184.25]:25617 "EHLO smtp-fw-9101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729748AbgIVHZE (ORCPT ); Tue, 22 Sep 2020 03:25:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1600759503; x=1632295503; h=from:to:cc:subject:date:message-id:mime-version: in-reply-to:content-transfer-encoding; bh=0+bAyvjF/IRHs0wEyMipvSEvEkOVBr0aJg9baDfrY4k=; b=XGm6a7cvA9g0jdo8UcG0YLC6gpcCaVZViT4eJ5TBqV/G4d/WeZPOl2op kftm/DSC91QomrA8PGE1sF9HPmF1CJIkmiE12F8cvDMovyw+Jx7/c3ckq LhNgkmW30NFOgzWt3bZaiqaCOy92DGdvVc29TpyD0YxxJw5GM166Kfz31 w=; X-IronPort-AV: E=Sophos;i="5.77,289,1596499200"; d="scan'208";a="70012700" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-2c-1968f9fa.us-west-2.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-9101.sea19.amazon.com with ESMTP; 22 Sep 2020 07:25:02 +0000 Received: from EX13D31EUA004.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan3.pdx.amazon.com [10.170.41.166]) by email-inbound-relay-2c-1968f9fa.us-west-2.amazon.com (Postfix) with ESMTPS id 1D0C8A0829; Tue, 22 Sep 2020 07:25:01 +0000 (UTC) Received: from u3f2cd687b01c55.ant.amazon.com (10.43.160.185) by EX13D31EUA004.ant.amazon.com (10.43.165.161) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 22 Sep 2020 07:24:54 +0000 From: SeongJae Park To: =?UTF-8?q?J=C3=BCrgen=20Gro=C3=9F?= CC: SeongJae Park , , , SeongJae Park , , , , , , , Subject: Re: [PATCH] xen-blkback: add a parameter for disabling of persistent grants Date: Tue, 22 Sep 2020 09:24:37 +0200 Message-ID: <20200922072437.2495-1-sjpark@amazon.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 In-Reply-To: <5fd34475-c296-c4f3-2bac-180c166449fe@suse.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.43.160.185] X-ClientProxiedBy: EX13D39UWA004.ant.amazon.com (10.43.160.73) To EX13D31EUA004.ant.amazon.com (10.43.165.161) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 22 Sep 2020 09:18:05 +0200 "Jürgen Groß" wrote: > On 22.09.20 09:01, SeongJae Park wrote: > > From: SeongJae Park > > > > Persistent grants feature provides high scalability. On some small > > systems, however, it could incur data copy overhead[1] and thus it is > > required to be disabled. But, there is no option to disable it. For > > the reason, this commit adds a module parameter for disabling of the > > feature. > > > > [1] https://wiki.xen.org/wiki/Xen_4.3_Block_Protocol_Scalability > > > > Signed-off-by: Anthony Liguori > > Signed-off-by: SeongJae Park > > --- > > .../ABI/testing/sysfs-driver-xen-blkback | 8 ++++++++ > > drivers/block/xen-blkback/xenbus.c | 17 ++++++++++++++--- > > 2 files changed, 22 insertions(+), 3 deletions(-) > > > > diff --git a/Documentation/ABI/testing/sysfs-driver-xen-blkback b/Documentation/ABI/testing/sysfs-driver-xen-blkback > > index ecb7942ff146..0c42285c75ee 100644 > > --- a/Documentation/ABI/testing/sysfs-driver-xen-blkback > > +++ b/Documentation/ABI/testing/sysfs-driver-xen-blkback > > @@ -35,3 +35,11 @@ Description: > > controls the duration in milliseconds that blkback will not > > cache any page not backed by a grant mapping. > > The default is 10ms. > > + > > +What: /sys/module/xen_blkback/parameters/feature_persistent > > +Date: September 2020 > > +KernelVersion: 5.10 > > +Contact: SeongJae Park > > +Description: > > + Whether to enable the persistent grants feature or not. > > + The default is 1 (enable). > > diff --git a/drivers/block/xen-blkback/xenbus.c b/drivers/block/xen-blkback/xenbus.c > > index b9aa5d1ac10b..9c03d70469f4 100644 > > --- a/drivers/block/xen-blkback/xenbus.c > > +++ b/drivers/block/xen-blkback/xenbus.c > > @@ -879,6 +879,12 @@ static void reclaim_memory(struct xenbus_device *dev) > > > > /* ** Connection ** */ > > > > +/* Enable the persistent grants feature. */ > > +static unsigned int feature_persistent = 1; > > Use bool, please. Oops, I will. > > > +module_param_named(feature_persistent, feature_persistent, int, 0644); > > module_param() > > > +MODULE_PARM_DESC(feature_persistent, > > + "Enables the persistent grants feature"); > > + > > /* > > * Write the physical details regarding the block device to the store, and > > * switch to Connected state. > > @@ -906,7 +912,8 @@ static void connect(struct backend_info *be) > > > > xen_blkbk_barrier(xbt, be, be->blkif->vbd.flush_support); > > > > - err = xenbus_printf(xbt, dev->nodename, "feature-persistent", "%u", 1); > > + err = xenbus_printf(xbt, dev->nodename, "feature-persistent", "%u", > > + feature_persistent ? 1 : 0); > > Using bool above should allow to just use the value of > feature_persistent here. Indeed. I will fix these as you recommended in the next spin. Thanks, SeongJae Park