Xen-Devel Archive on lore.kernel.org
 help / color / Atom feed
From: SeongJae Park <sj38.park@gmail.com>
To: jgross@suse.com, axboe@kernel.dk, konrad.wilk@oracle.com,
Cc: linux-block@vger.kernel.org, sjpark@amazon.com,
	pdurrant@amazon.com, SeongJae Park <sjpark@amazon.de>,
	linux-kernel@vger.kernel.org, sj38.park@gmail.com,
Subject: [Xen-devel] [PATCH v8 0/3] xenbus/backend: Add a memory pressure handler callback
Date: Fri, 13 Dec 2019 13:02:08 +0000
Message-ID: <20191213130211.24011-1-sjpark@amazon.de> (raw)

Granting pages consumes backend system memory.  In systems configured
with insufficient spare memory for those pages, it can cause a memory
pressure situation.  However, finding the optimal amount of the spare
memory is challenging for large systems having dynamic resource
utilization patterns.  Also, such a static configuration might lack

To mitigate such problems, this patchset adds a memory reclaim callback
to 'xenbus_driver' (patch 1) and use it to mitigate the problem in
'xen-blkback' (patch 2).  The third patch is a trivial cleanup of
variable names.

Base Version

This patch is based on v5.4.  A complete tree is also available at my
public git repo:

Patch History

Changes from v7
 - Update sysfs-driver-xen-blkback for new parameter
   (suggested by Roger Pau Monné)
 - Use per-xen_blkif buffer_squeeze_end instead of global variable
   (suggested by Roger Pau Monné)

Changes from v6
 - Remove more unnecessary prefixes (suggested by Roger Pau Monné)
 - Constify a variable (suggested by Roger Pau Monné)
 - Rename 'reclaim' into 'reclaim_memory' (suggested by Roger Pau Monné)
 - More wordsmith of the commit message (suggested by Roger Pau Monné)

Changes from v5
 - Wordsmith the commit messages (suggested by Roger Pau Monné)
 - Change the reclaim callback return type (suggested by Roger Pau Monné)
 - Change the type of the blkback squeeze duration variable
   (suggested by Roger Pau Monné)
 - Add a patch for removal of unnecessary static variable name prefixes
   (suggested by Roger Pau Monné)
 - Fix checkpatch.pl warnings

Changes from v4
 - Remove domain id parameter from the callback (suggested by Juergen Gross)
 - Rename xen-blkback module parameter (suggested by Stefan Nuernburger)

Changes from v3
 - Add general callback in xen_driver and use it (suggested by Juergen Gross)

Changes from v2
 - Rename the module parameter and variables for brevity
   (aggressive shrinking -> squeezing)

Changes from v1
 - Adjust the description to not use the term, `arbitrarily`
   (suggested by Paul Durrant)
 - Specify time unit of the duration in the parameter description,
   (suggested by Maximilian Heyne)
 - Change default aggressive shrinking duration from 1ms to 10ms
 - Merge two patches into one single patch

SeongJae Park (3):
  xenbus/backend: Add memory pressure handler callback
  xen/blkback: Squeeze page pools if a memory pressure is detected
  xen/blkback: Remove unnecessary static variable name prefixes

 .../ABI/testing/sysfs-driver-xen-blkback      |  9 +++
 drivers/block/xen-blkback/blkback.c           | 57 ++++++++++++-------
 drivers/block/xen-blkback/common.h            |  2 +
 drivers/block/xen-blkback/xenbus.c            | 11 +++-
 drivers/xen/xenbus/xenbus_probe_backend.c     | 32 +++++++++++
 include/xen/xenbus.h                          |  1 +
 6 files changed, 90 insertions(+), 22 deletions(-)


Xen-devel mailing list

             reply index

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-13 13:02 SeongJae Park [this message]
2019-12-13 13:02 ` [Xen-devel] [PATCH v8 1/3] xenbus/backend: Add " SeongJae Park
2019-12-13 13:02 ` [Xen-devel] [PATCH v8 2/3] xen/blkback: Squeeze page pools if a memory pressure is detected SeongJae Park
2019-12-13 14:34   ` Roger Pau Monné
2019-12-13 15:02     ` SeongJae Park
2019-12-13 13:02 ` [Xen-devel] [PATCH v8 3/3] xen/blkback: Remove unnecessary static variable name prefixes SeongJae Park

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191213130211.24011-1-sjpark@amazon.de \
    --to=sj38.park@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=jgross@suse.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pdurrant@amazon.com \
    --cc=roger.pau@citrix.com \
    --cc=sjpark@amazon.com \
    --cc=sjpark@amazon.de \
    --cc=xen-devel@lists.xenproject.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Xen-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/xen-devel/0 xen-devel/git/0.git
	git clone --mirror https://lore.kernel.org/xen-devel/1 xen-devel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 xen-devel xen-devel/ https://lore.kernel.org/xen-devel \
		xen-devel@lists.xenproject.org xen-devel@lists.xen.org
	public-inbox-index xen-devel

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git