Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3419389imm; Mon, 6 Aug 2018 04:35:27 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfK1oJBwn5R9oZ9+8mkFEWm2Kvwy6NhVOYdTTpcxjjPXYUr00scJAZfB+SatKPikrx0gD0T X-Received: by 2002:a65:60cd:: with SMTP id r13-v6mr14223227pgv.232.1533555327778; Mon, 06 Aug 2018 04:35:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533555327; cv=none; d=google.com; s=arc-20160816; b=w6ZIk2GGLz7PClloCTpxFGJMtu2c4ifMxdDWz1uD6v3ujqTSPm/D1Fx4REL1HvU4gb QKmRy20NIuItVd9KHInutR9ZOuaVsuMkgUL5IXwKC0uYrGxA9ODtCqlpLjUfZ8A6Rknt dt3gksx6IJABad49ytzhBfVo015crqg5vV0DLTm/3hc9mDHD8fw7Nwu2Pqt2lusQFCTr 7XLt/jcywwEDtqKvPldviYSZ9zuUC3Gbcx15BPlWiLvlT/72M+17WnWKVgwr9kgSuGtC OB/kA+weaOmff6KTga7cd0GL6riskFfpwTT+pnmePafDT8e6qAPiSb3gaZF/bh0R/e8c rQ7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=eosVGiKR6RNzVyxSISt2juEWLvRzF1zpLul66EhyQQk=; b=mu8WC2WHPNDcEnXtNyYh3CiQ1sg775sgigQOPMIdmJw97htC3rPard+byw7jKoleGo xNiYzUZLEzc7GGC5R1vG0HJ4fM+NLS8CRUB5n4BMsP8fEDejeZn3bs/PNjAfEBLKWOFH d61f34CN7sXpYJTsp1d120xgGuksdNoW+pAAZ6Xvv9u1EQ48sU/Ya42qtTh/wENPUAm5 t40d1ijLbbxlknwnRXog5Ve7axBoik6s8mcmR7LKfpXSbU/QyIZu5hP/NGnhm141QCxm sEZtNMtUFrrDEC8S831WA/Zi8WmunoY30lBxZu/y6Kru18NXIwAlOJmeC9CtIEMDxTyz O4uQ== 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 t10-v6si9654068plh.306.2018.08.06.04.35.12; Mon, 06 Aug 2018 04:35:27 -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 S1730616AbeHFNnB (ORCPT + 99 others); Mon, 6 Aug 2018 09:43:01 -0400 Received: from mx2.suse.de ([195.135.220.15]:33720 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728417AbeHFNnA (ORCPT ); Mon, 6 Aug 2018 09:43:00 -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 D8009AE83; Mon, 6 Aug 2018 11:34:18 +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 0/4] xen/blk: persistent grant rework Date: Mon, 6 Aug 2018 13:33:58 +0200 Message-Id: <20180806113403.24728-1-jgross@suse.com> X-Mailer: git-send-email 2.13.7 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 2 patches are small cleanups of blkfront and blkback drivers. Juergen Gross (4): xen/blkback: don't keep persistent grants too long xen/blkfront: cleanup stale persistent grants xen/blkfront: reorder tests in xlblk_init() xen/blkback: remove unused pers_gnts_lock from struct xen_blkif_ring drivers/block/xen-blkback/blkback.c | 77 +++++++++++++++--------- drivers/block/xen-blkback/common.h | 2 +- drivers/block/xen-blkfront.c | 115 ++++++++++++++++++++++++++++++++---- 3 files changed, 153 insertions(+), 41 deletions(-) -- 2.13.7