]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xen-blkfront: dynamic configuration of per-vbd resources
authorBob Liu <bob.liu@oracle.com>
Fri, 1 Jul 2016 01:11:15 +0000 (21:11 -0400)
committerChuck Anderson <chuck.anderson@oracle.com>
Wed, 13 Jul 2016 08:04:49 +0000 (01:04 -0700)
commitad4995196dadeb80065a48dfcdb34f467ac1c654
treef0084e1948d0ceb35c9a9dfa2daad4d515285ed8
parent9ac838d6e2d4459b51d77a1b45066a519f5a77d1
xen-blkfront: dynamic configuration of per-vbd resources

The current VBD layer reserves buffer space for each attached device based on
three statically configured settings which are read at boot time.
 * max_indirect_segs: Maximum amount of segments.
 * max_ring_page_order: Maximum order of pages to be used for the shared ring.
 * max_queues: Maximum of queues(rings) to be used.

But the storage backend, workload, and guest memory result in very different
tuning requirements. It's impossible to centrally predict application
characteristics so it's best to leave allow the settings can be dynamiclly
adjusted based on workload inside the Guest.

Usage:
Show current values:
cat /sys/devices/vbd-xxx/max_indirect_segs
cat /sys/devices/vbd-xxx/max_ring_page_order
cat /sys/devices/vbd-xxx/max_queues

Write new values:
echo <new value> > /sys/devices/vbd-xxx/max_indirect_segs
echo <new value> > /sys/devices/vbd-xxx/max_ring_page_order
echo <new value> > /sys/devices/vbd-xxx/max_queues

Orabug: 23720696
Signed-off-by: Bob Liu <bob.liu@oracle.com>
--
v2: Add device lock and other comments from Konrad.
drivers/block/xen-blkfront.c