2020-01-13 09:51:25

by SeongJae Park

[permalink] [raw]
Subject: Re: [Xen-devel] [PATCH v13 0/5] xenbus/backend: Add memory pressure handler callback

Every patch of this patchset got at least one 'Reviewed-by' or 'Acked-by' from
appropriate maintainers by last Wednesday, and after that, got no comment yet.
May I ask some more comments?


Thanks,
SeongJae Park

On Wed, 18 Dec 2019 19:37:13 +0100 SeongJae Park <[email protected]> wrote:

> 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
> flexibility.
>
> To mitigate such problems, this patchset adds a memory reclaim callback
> to 'xenbus_driver' (patch 1) and then introduce a lock for race
> condition avoidance (patch 2). After that, patch 3 applies the callback
> mechanism to mitigate the problem in 'xen-blkback'. The fourth and
> fifth patches are trivial cleanups; those fix nits we found during the
> development of this patchset.
>
> Note that patches 1, 4, and 5 are not changed since v9.
>
>
> Base Version
> ------------
>
> This patch is based on v5.4. A complete tree is also available at my
> public git repo:
> https://github.com/sjp38/linux/tree/patches/blkback/buffer_squeeze/v13
>
>
> Patch History
> -------------
>
> Changes from v12
> (https://lore.kernel.org/xen-devel/[email protected]/)
> - Do not unnecessarily disable interrupts (suggested by Juergen)
> - Hold lock from xenbus side (suggested by Juergen)
>
> Changes from v11
> (https://lore.kernel.org/xen-devel/[email protected]/)
> - Fix wrong trylock use (reported by Juergen)
> - Merge patch 3 and 4 (suggested by Juergen)
> - Update test result
>
> Changes from v10
> (https://lore.kernel.org/xen-devel/[email protected]/)
> - Fix race condition (reported by SeongJae, suggested by Juergen)
>
> Changes from v9
> (https://lore.kernel.org/xen-devel/[email protected]/)
> - Add 'Reviewed-by' and 'Acked-by' from Roger Pau Monné
> - Update the commit message for overhead test of the 2nd path
>
> Changes from v8
> (https://lore.kernel.org/xen-devel/[email protected]/)
> - Drop 'Reviewed-by: Juergen' from the second patch
> (suggested by Roger Pau Monné)
> - Update contact of the new module param to SeongJae Park
> <[email protected]>
> (suggested by Roger Pau Monné)
> - Wordsmith the description of the parameter
> (suggested by Roger Pau Monné)
> - Fix dumb bugs
> (suggested by Roger Pau Monné)
> - Move module param definition to xenbus.c and reduce the number of
> lines for this change
> (suggested by Roger Pau Monné)
> - Add a comment for the new callback, reclaim_memory, as other
> callbacks also have
> - Add another trivial cleanup of xenbus.c file (4th patch)
>
> Changes from v7
> (https://lore.kernel.org/xen-devel/[email protected]/)
> - 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
> (https://lore.kernel.org/linux-block/[email protected]/)
> - 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
> (https://lore.kernel.org/linux-block/[email protected]/)
> - 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
> (https://lore.kernel.org/xen-devel/[email protected]/)
> - Remove domain id parameter from the callback (suggested by Juergen
> Gross)
> - Rename xen-blkback module parameter (suggested by Stefan Nuernburger)
>
> Changes from v3
> (https://lore.kernel.org/xen-devel/[email protected]/)
> - Add general callback in xen_driver and use it (suggested by Juergen
> Gross)
>
> Changes from v2
> (https://lore.kernel.org/linux-block/[email protected])
> - Rename the module parameter and variables for brevity
> (aggressive shrinking -> squeezing)
>
> Changes from v1
> (https://lore.kernel.org/xen-devel/[email protected]/)
> - 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 (5):
> xenbus/backend: Add memory pressure handler callback
> xenbus/backend: Protect xenbus callback with lock
> xen/blkback: Squeeze page pools if a memory pressure is detected
> xen/blkback: Remove unnecessary static variable name prefixes
> xen/blkback: Consistently insert one empty line between functions
>
> .../ABI/testing/sysfs-driver-xen-blkback | 10 +++++
> drivers/block/xen-blkback/blkback.c | 42 +++++++++----------
> drivers/block/xen-blkback/common.h | 1 +
> drivers/block/xen-blkback/xenbus.c | 28 ++++++++++---
> drivers/xen/xenbus/xenbus_probe.c | 8 +++-
> drivers/xen/xenbus/xenbus_probe_backend.c | 38 +++++++++++++++++
> include/xen/xenbus.h | 3 ++
> 7 files changed, 103 insertions(+), 27 deletions(-)
>
> --
> 2.17.1
>


2020-01-13 09:56:21

by Roger Pau Monne

[permalink] [raw]
Subject: Re: [Xen-devel] [PATCH v13 0/5] xenbus/backend: Add memory pressure handler callback

On Mon, Jan 13, 2020 at 10:49:52AM +0100, SeongJae Park wrote:
> Every patch of this patchset got at least one 'Reviewed-by' or 'Acked-by' from
> appropriate maintainers by last Wednesday, and after that, got no comment yet.
> May I ask some more comments?

I'm not sure why more comments are needed, patches have all the
relevant Acks and will be pushed in due time unless someone has
objections.

Please be patient and wait at least until the next merge window, this
patches are not bug fixes so pushing them now would be wrong.

Roger.

2020-01-13 10:02:08

by SeongJae Park

[permalink] [raw]
Subject: Re: Re: [Xen-devel] [PATCH v13 0/5] xenbus/backend: Add memory pressure handler callback

On Mon, 13 Jan 2020 10:55:07 +0100 "Roger Pau Monné" <[email protected]> wrote:

> On Mon, Jan 13, 2020 at 10:49:52AM +0100, SeongJae Park wrote:
> > Every patch of this patchset got at least one 'Reviewed-by' or 'Acked-by' from
> > appropriate maintainers by last Wednesday, and after that, got no comment yet.
> > May I ask some more comments?
>
> I'm not sure why more comments are needed, patches have all the
> relevant Acks and will be pushed in due time unless someone has
> objections.
>
> Please be patient and wait at least until the next merge window, this
> patches are not bug fixes so pushing them now would be wrong.

Ok, I will. Thank you for your quick and nice reply.


Thanks,
SeongJae Park

>
> Roger.
>