<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/vhost, branch v2.6.34</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.34</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.34'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2010-05-12T15:04:04Z</updated>
<entry>
<title>vhost: fix barrier pairing</title>
<updated>2010-05-12T15:04:04Z</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2010-05-11T16:44:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0d4993563bde70bc7c7718686bc5c5c089733001'/>
<id>urn:sha1:0d4993563bde70bc7c7718686bc5c5c089733001</id>
<content type='text'>
According to memory-barriers.txt, an smp memory barrier in guest
should always be paired with an smp memory barrier in host,
and I quote "a lack of appropriate pairing is almost certainly an
error". In case of vhost, failure to flush out used index
update before looking at the interrupt disable flag
could result in missed interrupts, resulting in
networking hang under stress.

This might happen when flags read bypasses used index write.
So we see interrupts disabled and do not interrupt, at the
same time guest writes flags value to enable interrupt,
reads an old used index value, thinks that
used ring is empty and waits for interrupt.

Note: the barrier we pair with here is in
drivers/virtio/virtio_ring.c, function
vring_enable_cb.

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Acked-by: Juan Quintela &lt;quintela@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' of /home/davem/src/GIT/linux-2.6/</title>
<updated>2010-04-11T09:44:30Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2010-04-11T09:44:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4a1032faac94ebbf647460ae3e06fc21146eb280'/>
<id>urn:sha1:4a1032faac94ebbf647460ae3e06fc21146eb280</id>
<content type='text'>
</content>
</entry>
<entry>
<title>vhost-net: fix vq_memory_access_ok error checking</title>
<updated>2010-04-07T14:04:45Z</updated>
<author>
<name>Jeff Dike</name>
<email>jdike@addtoit.com</email>
</author>
<published>2010-04-07T13:59:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=179b284e2fc0c638035843968f7d7ab8ab701525'/>
<id>urn:sha1:179b284e2fc0c638035843968f7d7ab8ab701525</id>
<content type='text'>
vq_memory_access_ok needs to check whether mem == NULL

Signed-off-by: Jeff Dike &lt;jdike@linux.intel.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h</title>
<updated>2010-03-30T13:02:32Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2010-03-24T08:04:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5a0e3ad6af8660be21ca98a971cd00f331318c05'/>
<id>urn:sha1:5a0e3ad6af8660be21ca98a971cd00f331318c05</id>
<content type='text'>
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -&gt; slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Guess-its-ok-by: Christoph Lameter &lt;cl@linux-foundation.org&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Lee Schermerhorn &lt;Lee.Schermerhorn@hp.com&gt;
</content>
</entry>
<entry>
<title>vhost: fix error handling in vring ioctls</title>
<updated>2010-03-17T21:07:35Z</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2010-03-17T14:06:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=535297a6ae4c3b7a0562e71fac15c213eeec68e7'/>
<id>urn:sha1:535297a6ae4c3b7a0562e71fac15c213eeec68e7</id>
<content type='text'>
Stanse found a locking problem in vhost_set_vring:
several returns from VHOST_SET_VRING_KICK, VHOST_SET_VRING_CALL,
VHOST_SET_VRING_ERR with the vq-&gt;mutex held.
Fix these up.

Reported-by: Jiri Slaby &lt;jirislaby@gmail.com&gt;
Acked-by: Laurent Chavey &lt;chavey@google.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>vhost: fix interrupt mitigation with raw sockets</title>
<updated>2010-03-17T14:44:20Z</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2010-03-08T21:24:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0e255572121180c900e24e33b87047abd8153cce'/>
<id>urn:sha1:0e255572121180c900e24e33b87047abd8153cce</id>
<content type='text'>
A thinko in code means we never trigger interrupt
mitigation. Fix this.

Reported-by: Juan Quintela &lt;quintela@redhat.com&gt;
Reported-by: Unai Uribarri &lt;unai.uribarri@optenet.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>vhost: fix error path in vhost_net_set_backend</title>
<updated>2010-03-07T11:28:53Z</updated>
<author>
<name>Jeff Dike</name>
<email>jdike@addtoit.com</email>
</author>
<published>2010-03-04T21:10:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1dace8c801ac531022bd31a7316a6b4351837617'/>
<id>urn:sha1:1dace8c801ac531022bd31a7316a6b4351837617</id>
<content type='text'>
An error could cause vhost_net_set_backend to exit without unlocking
vq-&gt;mutex. Fix this.

Signed-off-by: Jeff Dike &lt;jdike@linux.intel.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>vhost-net: restart tx poll on sk_sndbuf full</title>
<updated>2010-02-28T17:50:33Z</updated>
<author>
<name>Sridhar Samudrala</name>
<email>samudrala@us.ibm.com</email>
</author>
<published>2010-02-28T17:39:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=39286fa41a8b2c6a9c1f656a7b3c3efca95bc1b9'/>
<id>urn:sha1:39286fa41a8b2c6a9c1f656a7b3c3efca95bc1b9</id>
<content type='text'>
guest to remote communication with vhost net sometimes stops until
guest driver is restarted. This happens when we get guest kick precisely
when the backend send queue is full, as a result handle_tx() returns without
polling backend. This patch fixes this by restarting tx poll on this condition.

Signed-off-by: Sridhar Samudrala &lt;samudrala@us.ibm.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Tested-by: Tom Lendacky &lt;toml@us.ibm.com&gt;
</content>
</entry>
<entry>
<title>vhost: fix get_user_pages_fast error handling</title>
<updated>2010-02-28T17:42:36Z</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2010-02-23T09:25:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d6db3f5c11dc7ed5712d5d5682aa34025ee5248e'/>
<id>urn:sha1:d6db3f5c11dc7ed5712d5d5682aa34025ee5248e</id>
<content type='text'>
get_user_pages_fast returns number of pages on success, negative value
on failure, but never 0. Fix vhost code to match this logic.

Reviewed-by: Juan Quintela &lt;quintela@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>vhost: initialize log eventfd context pointer</title>
<updated>2010-02-28T17:42:35Z</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2010-02-23T09:23:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=73a99f083009d67d8e12603420e008d5c21b0b7d'/>
<id>urn:sha1:73a99f083009d67d8e12603420e008d5c21b0b7d</id>
<content type='text'>
vq log eventfd context pointer needs to be initialized, otherwise
operation may fail or oops if log is enabled but log eventfd not set by
userspace.  When log_ctx for device is created, it is copied to the vq.
This reset was missing.

Reviewed-by: Juan Quintela &lt;quintela@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
</feed>
