Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp890951imm; Wed, 8 Aug 2018 07:27:56 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwyNH+MW8U0IWBsvh3zGeimoiA9X/5dZc/JQG7Ugp+M43qnz7at3X0et6d1jFmrBaG6nKGs X-Received: by 2002:a17:902:26:: with SMTP id 35-v6mr2828209pla.276.1533738476686; Wed, 08 Aug 2018 07:27:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533738476; cv=none; d=google.com; s=arc-20160816; b=O8AmW4nOF1DdIPIIYfPyrc5HVCtdb04tck37yeMTc3fW1JHgwiJdxSEVT+NOqe+XIF EkLuRiP3QSbsIdGYFCBP9yuIT03pxCIm7cS3eepCf6BeZ04MMlakp3tL91ux+85CSDes G0ZY+xgy75JOTEQ+nmilWElgyMpWdLFdBgWr7F8b7pj1+ouHPu0u3kCLjK4HzAMY+O7Y moJ+eqFTi9MHeqAy24TDg4dBgzl3I2acbQSHVsk3s/+KbAjz/Ql/WBgWX+Jpr55YVPt8 GYLg6j5KkRmqk9dASuFX360d+HCRJ5lR3ZFC4oflsaj4DWnXeOHr9p88S/w4ykqfMWCk cpmA== 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:mime-version :message-id:date:subject:cc:to:from:arc-authentication-results; bh=FqKYfEYpdmyfUG1JHWWiSufAcT9uXI32dtuhM6wJVwM=; b=BuxJF1w1FOQBw/iIXISjItaV5u2uqsPEmpDgGSNKWm6fmiW4I1UE8gw4rhQ9/AhEa9 3IM16rVKtWLp4EUsMIEmQIibexNVV43saSjwbG9/ij1ZM/botspizcwZO9iXbPsauYBY 4jwowcBvoTXlgur84JlGBPlK71Ii5BuqCcWJTfZzWqcUhEommR/qpSCkC7acULufViOE Tg5XaW9EZgNDvz3Z/Frupju7JdP1tIYSf8v9Sp6NG769mXhmwfhS26FDUy4tFoaBTR7N sMdLv2wuVT5vCP19HOuOD+w8kJZU9Ttj7yfvQlsVVButfOLW/nquwM/3h2T81vl6PoHM GZeQ== 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 o8-v6si4310965pgo.2.2018.08.08.07.27.42; Wed, 08 Aug 2018 07:27:56 -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 S1727489AbeHHQpl (ORCPT + 99 others); Wed, 8 Aug 2018 12:45:41 -0400 Received: from mx2.suse.de ([195.135.220.15]:55176 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727177AbeHHQpk (ORCPT ); Wed, 8 Aug 2018 12:45:40 -0400 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 D18B5AE15; Wed, 8 Aug 2018 14:25:45 +0000 (UTC) From: Juergen Gross To: linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, linux-block@vger.kernel.org Cc: konrad.wilk@oracle.com, roger.pau@citrix.com, axboe@kernel.dk, boris.ostrovsky@oracle.com, Juergen Gross Subject: [PATCH v2 0/5] xen/blk: persistent grant rework Date: Wed, 8 Aug 2018 16:25:23 +0200 Message-Id: <20180808142528.31029-1-jgross@suse.com> X-Mailer: git-send-email 2.13.7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Persistent grants are used in the Xen's blkfront/blkback drivers to avoid mapping/unmapping of I/O buffers in the backend for each I/O. While this speeds up processing quite a bit there are problems related to persistent grants in some configurations: domains with multiple block devices making use of persistent grants might suffer from a lack of grants if each of the block devices experienced a high I/O load at some time. This is due to the number of persistent grants per device only to be limited by a rather high maximum value, but never being released even in case of longer times without any I/O. This series modifies xen-blkback to unmap any domU page mapped via a persistent grant after a timeout (default: 60 seconds). The timeout is set to its default value again when a persistent grant has been used for an I/O. xen-blkfront is modified to scan every 10 seconds for persistent grants not in use by blkback any more and to remove such grants. The last 3 patches are small cleanups of blkfront and blkback drivers. V2: - patch 1: added new module parameter doc - patch 1: removed PERSISTENT_GNT_WAS_ACTIVE flag - patch 2: removed global worker active flag - added new patch 4 Juergen Gross (5): xen/blkback: don't keep persistent grants too long xen/blkfront: cleanup stale persistent grants xen/blkfront: reorder tests in xlblk_init() xen/blkback: move persistent grants flags to bool xen/blkback: remove unused pers_gnts_lock from struct xen_blkif_ring Documentation/ABI/testing/sysfs-driver-xen-blkback | 10 ++ drivers/block/xen-blkback/blkback.c | 99 ++++++++++--------- drivers/block/xen-blkback/common.h | 14 +-- drivers/block/xen-blkfront.c | 110 ++++++++++++++++++--- 4 files changed, 163 insertions(+), 70 deletions(-) -- 2.13.7