xen/blkback: don't keep persistent grants too long
authorJuergen Gross <jgross@suse.com>
Mon, 13 Aug 2018 14:01:10 +0000 (16:01 +0200)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Mon, 27 Aug 2018 16:12:03 +0000 (12:12 -0400)
commit973e5405f2f67ddbb2bf07b3ffc71908a37fea8e
tree291850d68c314417cb2b074fddf9aa5171126a7a
parentb86d865cb1cae1e61527ea0b8977078bbf694328
xen/blkback: don't keep persistent grants too long

Persistent grants are allocated until a threshold per ring is being
reached. Those grants won't be freed until the ring is being destroyed
meaning there will be resources kept busy which might no longer be
used.

Instead of freeing only persistent grants until the threshold is
reached add a timestamp and remove all persistent grants not having
been in use for a minute.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Documentation/ABI/testing/sysfs-driver-xen-blkback
drivers/block/xen-blkback/blkback.c
drivers/block/xen-blkback/common.h