<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/vhost, branch v3.12.10</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/vhost?h=v3.12.10</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/vhost?h=v3.12.10'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-10-25T18:03:34Z</updated>
<entry>
<title>vhost/scsi: Fix incorrect usage of get_user_pages_fast write parameter</title>
<updated>2013-10-25T18:03:34Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2013-10-25T17:44:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=60a01f558af9c48b0bb31f303c479e32721add3f'/>
<id>urn:sha1:60a01f558af9c48b0bb31f303c479e32721add3f</id>
<content type='text'>
This patch addresses a long-standing bug where the get_user_pages_fast()
write parameter used for setting the underlying page table entry permission
bits was incorrectly set to write=1 for data_direction=DMA_TO_DEVICE, and
passed into get_user_pages_fast() via vhost_scsi_map_iov_to_sgl().

However, this parameter is intended to signal WRITEs to pinned userspace
PTEs for the virtio-scsi DMA_FROM_DEVICE -&gt; READ payload case, and *not*
for the virtio-scsi DMA_TO_DEVICE -&gt; WRITE payload case.

This bug would manifest itself as random process segmentation faults on
KVM host after repeated vhost starts + stops and/or with lots of vhost
endpoints + LUNs.

Cc: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Cc: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Cc: Asias He &lt;asias@redhat.com&gt;
Cc: &lt;stable@vger.kernel.org&gt; # 3.6+
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>vhost/scsi: Use GFP_ATOMIC with percpu_ida_alloc for obtaining tag</title>
<updated>2013-10-02T04:27:31Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2013-09-23T18:42:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4a47d3a1ff10e564bf04f27ac14552df64f60cdf'/>
<id>urn:sha1:4a47d3a1ff10e564bf04f27ac14552df64f60cdf</id>
<content type='text'>
Fix GFP_KERNEL -&gt; GFP_ATOMIC usage of percpu_ida_alloc() within
vhost_scsi_get_tag(), as this code is expected to be called directly
from interrupt context.

v2 changes:

  - Handle possible tag &lt; 0 failure with GFP_ATOMIC

Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Acked-by: Asias He &lt;asias@redhat.com&gt;
Cc: Kent Overstreet &lt;kmo@daterainc.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>vhost-scsi: whitespace tweak</title>
<updated>2013-09-17T19:56:09Z</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2013-09-17T19:54:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d3d665a654a35c47463d2aa6353bac3ce293f4f5'/>
<id>urn:sha1:d3d665a654a35c47463d2aa6353bac3ce293f4f5</id>
<content type='text'>
Remove space at start of line that sneaked in.

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>vhost/scsi: use vmalloc for order-10 allocation</title>
<updated>2013-09-17T19:55:46Z</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2013-09-17T06:30:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=595cb754983d4387cb25b3dcf08f5129663d634e'/>
<id>urn:sha1:595cb754983d4387cb25b3dcf08f5129663d634e</id>
<content type='text'>
As vhost scsi device struct is large, if the device is
created on a busy system, kzalloc() might fail, so this patch does a
fallback to vzalloc().

As vmalloc() adds overhead on data-path, add __GFP_REPEAT
to kzalloc() flags to do this fallback only when really needed.

Reviewed-by: Asias He &lt;asias@redhat.com&gt;
Reported-by: Dan Aloni &lt;alonid@stratoscale.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>vhost: wake up worker outside spin_lock</title>
<updated>2013-09-17T06:21:32Z</updated>
<author>
<name>Qin Chuanyu</name>
<email>qinchuanyu@huawei.com</email>
</author>
<published>2013-06-07T13:50:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ac9fde2474d04bd6574a037482e3de02b488a6c6'/>
<id>urn:sha1:ac9fde2474d04bd6574a037482e3de02b488a6c6</id>
<content type='text'>
the wake_up_process func is included by spin_lock/unlock in
vhost_work_queue,
but it could be done outside the spin_lock.
I have test it with kernel 3.0.27 and guest suse11-sp2 using iperf,
the num as below.
                  original                 modified
thread_num  tp(Gbps)   vhost(%)  |  tp(Gbps)     vhost(%)
1           9.59        28.82    |   9.59        27.49
8           9.61        32.92    |   9.62        26.77
64          9.58        46.48    |   9.55        38.99
256         9.6         63.7     |   9.6         52.59

Signed-off-by: Chuanyu Qin &lt;qinchuanyu@huawei.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending</title>
<updated>2013-09-12T23:11:45Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-09-12T23:11:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=48efe453e6b29561f78a1df55c7f58375259cb8c'/>
<id>urn:sha1:48efe453e6b29561f78a1df55c7f58375259cb8c</id>
<content type='text'>
Pull SCSI target updates from Nicholas Bellinger:
 "Lots of activity again this round for I/O performance optimizations
  (per-cpu IDA pre-allocation for vhost + iscsi/target), and the
  addition of new fabric independent features to target-core
  (COMPARE_AND_WRITE + EXTENDED_COPY).

  The main highlights include:

   - Support for iscsi-target login multiplexing across individual
     network portals
   - Generic Per-cpu IDA logic (kent + akpm + clameter)
   - Conversion of vhost to use per-cpu IDA pre-allocation for
     descriptors, SGLs and userspace page pointer list
   - Conversion of iscsi-target + iser-target to use per-cpu IDA
     pre-allocation for descriptors
   - Add support for generic COMPARE_AND_WRITE (AtomicTestandSet)
     emulation for virtual backend drivers
   - Add support for generic EXTENDED_COPY (CopyOffload) emulation for
     virtual backend drivers.
   - Add support for fast memory registration mode to iser-target (Vu)

  The patches to add COMPARE_AND_WRITE and EXTENDED_COPY support are of
  particular significance, which make us the first and only open source
  target to support the full set of VAAI primitives.

  Currently Linux clients are lacking upstream support to actually
  utilize these primitives.  However, with server side support now in
  place for folks like MKP + ZAB working on the client, this logic once
  reserved for the highest end of storage arrays, can now be run in VMs
  on their laptops"

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (50 commits)
  target/iscsi: Bump versions to v4.1.0
  target: Update copyright ownership/year information to 2013
  iscsi-target: Bump default TCP listen backlog to 256
  target: Fix &gt;= v3.9+ regression in PR APTPL + ALUA metadata write-out
  iscsi-target; Bump default CmdSN Depth to 64
  iscsi-target: Remove unnecessary wait_for_completion in iscsi_get_thread_set
  iscsi-target: Add thread_set-&gt;ts_activate_sem + use common deallocate
  iscsi-target: Fix race with thread_pre_handler flush_signals + ISCSI_THREAD_SET_DIE
  target: remove unused including &lt;linux/version.h&gt;
  iser-target: introduce fast memory registration mode (FRWR)
  iser-target: generalize rdma memory registration and cleanup
  iser-target: move rdma wr processing to a shared function
  target: Enable global EXTENDED_COPY setup/release
  target: Add Third Party Copy (3PC) bit in INQUIRY response
  target: Enable EXTENDED_COPY setup in spc_parse_cdb
  target: Add support for EXTENDED_COPY copy offload emulation
  target: Avoid non-existent tg_pt_gp_mem in target_alua_state_check
  target: Add global device list for EXTENDED_COPY
  target: Make helpers non static for EXTENDED_COPY command setup
  target: Make spc_parse_naa_6h_vendor_specific non static
  ...
</content>
</entry>
<entry>
<title>target: Update copyright ownership/year information to 2013</title>
<updated>2013-09-11T03:23:36Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2013-09-05T22:29:12Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4c76251e8e8f704ed7eace603a8041458a1ed16f'/>
<id>urn:sha1:4c76251e8e8f704ed7eace603a8041458a1ed16f</id>
<content type='text'>
Update copyright ownership/year information for target-core,
loopback, iscsi-target, tcm_qla2xx, vhost and iser-target.

Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>vhost/scsi: Add pre-allocation for tv_cmd SGL + upages memory</title>
<updated>2013-09-09T21:29:19Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2013-06-21T21:32:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3aee26b4ae91048c933dc622f00b7bb01f7f0ff1'/>
<id>urn:sha1:3aee26b4ae91048c933dc622f00b7bb01f7f0ff1</id>
<content type='text'>
This patch adds support for pre-allocation of per tv_cmd descriptor
scatterlist + user-space page pointer memory using se_sess-&gt;sess_cmd_map
within tcm_vhost_make_nexus() code.

This includes sanity checks within vhost_scsi_map_to_sgl()
to reject I/O that exceeds these initial hardcoded values, and
the necessary cleanup in tcm_vhost_make_nexus() failure path +
tcm_vhost_drop_nexus().

v3 changes:
  - Rebase to v3.11-rc5 code

Cc: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Cc: Asias He &lt;asias@redhat.com&gt;
Cc: Kent Overstreet &lt;kmo@daterainc.com&gt;
Reviewed-by: Asias He &lt;asias@redhat.com&gt;
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>vhost/scsi: Convert to per-cpu ida_alloc + ida_free command map</title>
<updated>2013-09-09T21:29:18Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2013-06-08T00:47:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4824d3bfb9097ac59cf7633c0bc4fb7c5b549a80'/>
<id>urn:sha1:4824d3bfb9097ac59cf7633c0bc4fb7c5b549a80</id>
<content type='text'>
This patch changes vhost/scsi to use transport_init_session_tags()
pre-allocation logic for per-cpu session tag pooling with internal
ida_alloc() + ida_free() calls based upon the saved se_cmd-&gt;map_tag id.

FIXME: Make transport_init_session_tags() number of tags setup
configurable per vring client setting via configfs

v5 changes:
 - Convert to percpu_ida.h include

v3 changes:
 - Update to percpu-ida usage
 - Rebase to v3.11-rc5 code

Cc: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Cc: Asias He &lt;asias@redhat.com&gt;
Cc: Kent Overstreet &lt;kmo@daterainc.com&gt;
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>vhost_net: correctly limit the max pending buffers</title>
<updated>2013-09-04T02:46:58Z</updated>
<author>
<name>Jason Wang</name>
<email>jasowang@redhat.com</email>
</author>
<published>2013-09-02T08:41:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f7c6be404d8fa52c54ff931390aab01e5c7654d6'/>
<id>urn:sha1:f7c6be404d8fa52c54ff931390aab01e5c7654d6</id>
<content type='text'>
As Michael point out, We used to limit the max pending DMAs to get better cache
utilization. But it was not done correctly since it was one done when there's no
new buffers submitted from guest. Guest can easily exceeds the limitation by
keeping sending packets.

So this patch moves the check into main loop. Tests shows about 5%-10%
improvement on per cpu throughput for guest tx.

Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
