<feed xmlns='http://www.w3.org/2005/Atom'>
<title>BMC/Intel-BMC/linux.git/drivers/block/xen-blkback, branch dev-4.6</title>
<subtitle>Intel OpenBMC Linux kernel source tree (mirror)</subtitle>
<id>https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev-4.6</id>
<link rel='self' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev-4.6'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/'/>
<updated>2016-03-03T21:45:54+00:00</updated>
<entry>
<title>xen/blback: Fit the important information of the thread in 17 characters</title>
<updated>2016-03-03T21:45:54+00:00</updated>
<author>
<name>Konrad Rzeszutek Wilk</name>
<email>konrad.wilk@oracle.com</email>
</author>
<published>2016-02-03T21:40:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=fa3184b898717d696242241541b8cbcb65c5d497'/>
<id>urn:sha1:fa3184b898717d696242241541b8cbcb65c5d497</id>
<content type='text'>
The processes names are truncated to 17, while we had the length
of the process as name 20 - which meant that while we filled
it out with various details - the last 3 characters (which had
the queue number) never surfaced to the user-space.

To simplify this and be able to fit the device name, domain id,
and the queue number we remove the 'blkback' from the name.

Prior to this patch the device name is "blkback.&lt;domid&gt;.&lt;name&gt;"
for example: blkback.8.xvda, blkback.11.hda.

With the multiqueue block backend we add "-%d" for the queue.
But sadly this is already way past the limit so it gets stripped.

Possible solution had been identified by Ian:
http://lists.xenproject.org/archives/html/xen-devel/2015-05/msg03516.html

  "
  If you are pressed for space then the "xvd" is probably a bit redundant
  in a string which starts blkbk.

  The guest may not even call the device xvdN (iirc BSD has another
  prefix) any how, so having blkback say so seems of limited use anyway.

  Since this seems to not include a partition number how does this work in
  the split partition scheme? (i.e. one where the guest is given xvda1 and
  xvda2 rather than xvda with a partition table)

[It will be 'blkback.8.xvda1', and 'blkback.11.xvda2']

  Perhaps something derived from one of the schemes in
  http://xenbits.xen.org/docs/unstable/misc/vbd-interface.txt might be a
  better fit?

After a bit of discussion (see
http://lists.xenproject.org/archives/html/xen-devel/2015-12/msg01588.html)
we settled on dropping the "blback" part.

This will make it possible to have the &lt;domid&gt;.&lt;name&gt;-&lt;queue&gt;:

 [1.xvda-0]
 [1.xvda-1]

And we enough space to make it go up to:

 [32100.xvdfg9-5]

Acked-by: Roger Pau Monné &lt;roger.pau@citrix.com&gt;
Reported-by: Jan Beulich &lt;jbeulich@suse.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
</entry>
<entry>
<title>xen-blkback: advertise indirect segment support earlier</title>
<updated>2016-03-03T21:45:53+00:00</updated>
<author>
<name>Jan Beulich</name>
<email>JBeulich@suse.com</email>
</author>
<published>2016-02-10T11:18:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=5a7058450cbc8702f976d1f444974485c70cb525'/>
<id>urn:sha1:5a7058450cbc8702f976d1f444974485c70cb525</id>
<content type='text'>
There's no reason to defer this until the connect phase, and in fact
there are frontend implementations expecting this to be available
earlier. Move it into the probe function.

Acked-by: Roger Pau Monné &lt;roger.pau@citrix.com&gt;
Signed-off-by: Jan Beulich &lt;jbeulich@suse.com&gt;
Cc: Bob Liu &lt;bob.liu@oracle.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-4.5/drivers' of git://git.kernel.dk/linux-block</title>
<updated>2016-01-22T02:19:38+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-01-22T02:19:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=641203549a21ba6a701aecd05c3dfc969ec670cc'/>
<id>urn:sha1:641203549a21ba6a701aecd05c3dfc969ec670cc</id>
<content type='text'>
Pull block driver updates from Jens Axboe:
 "This is the block driver pull request for 4.5, with the exception of
  NVMe, which is in a separate branch and will be posted after this one.

  This pull request contains:

   - A set of bcache stability fixes, which have been acked by Kent.
     These have been used and tested for more than a year by the
     community, so it's about time that they got in.

   - A set of drbd updates from the drbd team (Andreas, Lars, Philipp)
     and Markus Elfring, Oleg Drokin.

   - A set of fixes for xen blkback/front from the usual suspects, (Bob,
     Konrad) as well as community based fixes from Kiri, Julien, and
     Peng.

   - A 2038 time fix for sx8 from Shraddha, with a fix from me.

   - A small mtip32xx cleanup from Zhu Yanjun.

   - A null_blk division fix from Arnd"

* 'for-4.5/drivers' of git://git.kernel.dk/linux-block: (71 commits)
  null_blk: use sector_div instead of do_div
  mtip32xx: restrict variables visible in current code module
  xen/blkfront: Fix crash if backend doesn't follow the right states.
  xen/blkback: Fix two memory leaks.
  xen/blkback: make st_ statistics per ring
  xen/blkfront: Handle non-indirect grant with 64KB pages
  xen-blkfront: Introduce blkif_ring_get_request
  xen-blkback: clear PF_NOFREEZE for xen_blkif_schedule()
  xen/blkback: Free resources if connect_ring failed.
  xen/blocks: Return -EXX instead of -1
  xen/blkback: make pool of persistent grants and free pages per-queue
  xen/blkback: get the number of hardware queues/rings from blkfront
  xen/blkback: pseudo support for multi hardware queues/rings
  xen/blkback: separate ring information out of struct xen_blkif
  xen/blkfront: correct setting for xen_blkif_max_ring_order
  xen/blkfront: make persistent grants pool per-queue
  xen/blkfront: Remove duplicate setting of -&gt;xbdev.
  xen/blkfront: Cleanup of comments, fix unaligned variables, and syntax errors.
  xen/blkfront: negotiate number of queues/rings to be used with backend
  xen/blkfront: split per device io_lock
  ...
</content>
</entry>
<entry>
<title>xen/blkback: Fix two memory leaks.</title>
<updated>2016-01-04T17:21:26+00:00</updated>
<author>
<name>Bob Liu</name>
<email>bob.liu@oracle.com</email>
</author>
<published>2015-12-10T01:16:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=93bb277f97a6d319361766bde228717faf4abdeb'/>
<id>urn:sha1:93bb277f97a6d319361766bde228717faf4abdeb</id>
<content type='text'>
This patch fixs two memleaks:
  backtrace:
    [&lt;ffffffff817ba5e8&gt;] kmemleak_alloc+0x28/0x50
    [&lt;ffffffff81205e3b&gt;] kmem_cache_alloc+0xbb/0x1d0
    [&lt;ffffffff81534028&gt;] xen_blkbk_probe+0x58/0x230
    [&lt;ffffffff8146adb6&gt;] xenbus_dev_probe+0x76/0x130
    [&lt;ffffffff81511716&gt;] driver_probe_device+0x166/0x2c0
    [&lt;ffffffff815119bc&gt;] __device_attach_driver+0xac/0xb0
    [&lt;ffffffff8150fa57&gt;] bus_for_each_drv+0x67/0x90
    [&lt;ffffffff81511ab7&gt;] __device_attach+0xc7/0x120
    [&lt;ffffffff81511b23&gt;] device_initial_probe+0x13/0x20
    [&lt;ffffffff8151059a&gt;] bus_probe_device+0x9a/0xb0
    [&lt;ffffffff8150f0a1&gt;] device_add+0x3b1/0x5c0
    [&lt;ffffffff8150f47e&gt;] device_register+0x1e/0x30
    [&lt;ffffffff8146a9e8&gt;] xenbus_probe_node+0x158/0x170
    [&lt;ffffffff8146abaf&gt;] xenbus_dev_changed+0x1af/0x1c0
    [&lt;ffffffff8146b1bb&gt;] backend_changed+0x1b/0x20
    [&lt;ffffffff81468ca6&gt;] xenwatch_thread+0xb6/0x160
unreferenced object 0xffff880007ba8ef8 (size 224):

  backtrace:
    [&lt;ffffffff817ba5e8&gt;] kmemleak_alloc+0x28/0x50
    [&lt;ffffffff81205c73&gt;] __kmalloc+0xd3/0x1e0
    [&lt;ffffffff81534d87&gt;] frontend_changed+0x2c7/0x580
    [&lt;ffffffff8146af12&gt;] xenbus_otherend_changed+0xa2/0xb0
    [&lt;ffffffff8146b2c0&gt;] frontend_changed+0x10/0x20
    [&lt;ffffffff81468ca6&gt;] xenwatch_thread+0xb6/0x160
    [&lt;ffffffff810d3e97&gt;] kthread+0xd7/0xf0
    [&lt;ffffffff817c4a9f&gt;] ret_from_fork+0x3f/0x70
    [&lt;ffffffffffffffff&gt;] 0xffffffffffffffff
unreferenced object 0xffff8800048dcd38 (size 224):

The first leak is caused by not put() the be-&gt;blkif reference
which we had gotten in xen_blkif_alloc(), while the second is
us not freeing blkif-&gt;rings in the right place.

Signed-off-by: Bob Liu &lt;bob.liu@oracle.com&gt;
Reported-and-Tested-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
</entry>
<entry>
<title>xen/blkback: make st_ statistics per ring</title>
<updated>2016-01-04T17:21:25+00:00</updated>
<author>
<name>Bob Liu</name>
<email>bob.liu@oracle.com</email>
</author>
<published>2015-12-08T23:44:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=db6fbc106786f26d95889c50c18b1f28aa543a17'/>
<id>urn:sha1:db6fbc106786f26d95889c50c18b1f28aa543a17</id>
<content type='text'>
Make st_* statistics per ring and the VBD sysfs would iterate over all the
rings.

Note: xenvbd_sysfs_delif() is called in xen_blkbk_remove() before all rings
are torn down, so it's safe.

Signed-off-by: Bob Liu &lt;bob.liu@oracle.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
---
v2: Aligned the variables on the same column.
</content>
</entry>
<entry>
<title>xen-blkback: clear PF_NOFREEZE for xen_blkif_schedule()</title>
<updated>2016-01-04T17:21:24+00:00</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2015-10-26T05:47:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=a6e7af1288eeb7fca8361356998d31a92a291531'/>
<id>urn:sha1:a6e7af1288eeb7fca8361356998d31a92a291531</id>
<content type='text'>
xen_blkif_schedule() kthread calls try_to_freeze() at the beginning of
every attempt to purge the LRU. This operation can't ever succeed though,
as the kthread hasn't marked itself as freezable.

Before (hopefully eventually) kthread freezing gets converted to fileystem
freezing, we'd rather mark xen_blkif_schedule() freezable (as it can
generate I/O during suspend).

Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
</entry>
<entry>
<title>xen/blkback: Free resources if connect_ring failed.</title>
<updated>2016-01-04T17:21:07+00:00</updated>
<author>
<name>Konrad Rzeszutek Wilk</name>
<email>konrad.wilk@oracle.com</email>
</author>
<published>2015-11-25T18:20:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=2d0382fac17cef20d507a0211b82e0942b2ab271'/>
<id>urn:sha1:2d0382fac17cef20d507a0211b82e0942b2ab271</id>
<content type='text'>
With the multi-queue support we could fail at setting up
some of the rings and fail the connection. That meant that
all resources tied to rings[0..n-1] (where n is the ring
that failed to be setup). Eventually the frontend will switch
to the states and we will call xen_blkif_disconnect.

However we do not want to be at the mercy of the frontend
deciding when to change states. This allows us to do the
cleanup right away and freeing resources.

Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
</entry>
<entry>
<title>xen/blocks: Return -EXX instead of -1</title>
<updated>2016-01-04T17:21:07+00:00</updated>
<author>
<name>Konrad Rzeszutek Wilk</name>
<email>konrad.wilk@oracle.com</email>
</author>
<published>2015-11-25T18:07:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=bde21f73b9be146fda0c689f2724cda9d7737565'/>
<id>urn:sha1:bde21f73b9be146fda0c689f2724cda9d7737565</id>
<content type='text'>
Lets return sensible values instead of -1.

Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
</entry>
<entry>
<title>xen/blkback: make pool of persistent grants and free pages per-queue</title>
<updated>2016-01-04T17:21:06+00:00</updated>
<author>
<name>Bob Liu</name>
<email>bob.liu@oracle.com</email>
</author>
<published>2015-11-14T03:12:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=d4bf0065b7251afb723a29b2fd58f7c38f8ce297'/>
<id>urn:sha1:d4bf0065b7251afb723a29b2fd58f7c38f8ce297</id>
<content type='text'>
Make pool of persistent grants and free pages per-queue/ring instead of
per-device to get better scalability.

Test was done based on null_blk driver:
dom0: v4.2-rc8 16vcpus 10GB "modprobe null_blk"
domu: v4.2-rc8 16vcpus 10GB

[test]
rw=read
direct=1
ioengine=libaio
bs=4k
time_based
runtime=30
filename=/dev/xvdb
numjobs=16
iodepth=64
iodepth_batch=64
iodepth_batch_complete=64
group_reporting

Results:
iops1: After patch "xen/blkfront: make persistent grants per-queue".
iops2: After this patch.

Queues:			  1 	   4 	  	  8 	 	 16
Iops orig(k):		810 	1064 		780 		700
Iops1(k):		810     1230(~20%)	1024(~20%)	850(~20%)
Iops2(k):		810     1410(~35%)	1354(~75%)      1440(~100%)

With 4 queues after this commit we can get ~75% increase in IOPS, and
performance won't drop if increasing queue numbers.

Please find the respective chart in this link:
https://www.dropbox.com/s/agrcy2pbzbsvmwv/iops.png?dl=0

Signed-off-by: Bob Liu &lt;bob.liu@oracle.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
</entry>
<entry>
<title>xen/blkback: get the number of hardware queues/rings from blkfront</title>
<updated>2016-01-04T17:21:06+00:00</updated>
<author>
<name>Bob Liu</name>
<email>bob.liu@oracle.com</email>
</author>
<published>2015-11-14T03:12:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=d62d86000316d7ef38e1c2e9602c3ce6d1cb57bd'/>
<id>urn:sha1:d62d86000316d7ef38e1c2e9602c3ce6d1cb57bd</id>
<content type='text'>
Backend advertises "multi-queue-max-queues" to front, also get the negotiated
number from "multi-queue-num-queues" written by blkfront.

Signed-off-by: Bob Liu &lt;bob.liu@oracle.com&gt;
Signed-off-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
</content>
</entry>
</feed>
