<feed xmlns='http://www.w3.org/2005/Atom'>
<title>litmus2008.git/drivers/infiniband/core/uverbs.h, branch start</title>
<subtitle>[ARCHIVE] Old LITMUS^RT 2008 version (for reference).</subtitle>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus2008.git/'/>
<entry>
<title>IB/uverbs: Avoid a crash on device hot remove</title>
<updated>2006-08-03T17:56:42+00:00</updated>
<author>
<name>Jack Morgenstein</name>
<email>jackm@mellanox.co.il</email>
</author>
<published>2006-08-03T17:56:42+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus2008.git/commit/?id=fd60ae404f104f12369e654af9cf03b1f1047661'/>
<id>fd60ae404f104f12369e654af9cf03b1f1047661</id>
<content type='text'>
Wait until all users have closed their device context before allowing
device unregistration to complete.  This prevents a crash caused by
referring to stale data structures.

A better solution would be to have a way to revoke contexts rather
than waiting for userspace to close the context, but that's a much
bigger change that will have to wait.  For now let's at least avoid
the crash.

Signed-off-by: Jack Morgenstein &lt;jackm@mellanox.co.il&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@mellanox.co.il&gt;
Signed-off-by: Roland Dreier &lt;rolandd@cisco.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Wait until all users have closed their device context before allowing
device unregistration to complete.  This prevents a crash caused by
referring to stale data structures.

A better solution would be to have a way to revoke contexts rather
than waiting for userspace to close the context, but that's a much
bigger change that will have to wait.  For now let's at least avoid
the crash.

Signed-off-by: Jack Morgenstein &lt;jackm@mellanox.co.il&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@mellanox.co.il&gt;
Signed-off-by: Roland Dreier &lt;rolandd@cisco.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>IB/uverbs: Don't serialize with ib_uverbs_idr_mutex</title>
<updated>2006-06-18T03:44:49+00:00</updated>
<author>
<name>Roland Dreier</name>
<email>rolandd@cisco.com</email>
</author>
<published>2006-06-18T03:44:49+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus2008.git/commit/?id=9ead190bfde2a434c74ea604382d08acb2eceef5'/>
<id>9ead190bfde2a434c74ea604382d08acb2eceef5</id>
<content type='text'>
Currently, all userspace verbs operations that call into the kernel
are serialized by ib_uverbs_idr_mutex.  This can be a scalability
issue for some workloads, especially for devices driven by the ipath
driver, which needs to call into the kernel even for datapath
operations.

Fix this by adding reference counts to the userspace objects, and then
converting ib_uverbs_idr_mutex into a spinlock that only protects the
idrs long enough to take a reference on the object being looked up.
Because remove operations may fail, we have to do a slightly funky
two-step deletion, which is described in the comments at the top of
uverbs_cmd.c.

This also still leaves ib_uverbs_idr_lock as a single lock that is
possibly subject to contention.  However, the lock hold time will only
be a single idr operation, so multiple threads should still be able to
make progress, even if ib_uverbs_idr_lock is being ping-ponged.

Surprisingly, these changes even shrink the object code:

add/remove: 23/5 grow/shrink: 4/21 up/down: 633/-693 (-60)

Signed-off-by: Roland Dreier &lt;rolandd@cisco.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, all userspace verbs operations that call into the kernel
are serialized by ib_uverbs_idr_mutex.  This can be a scalability
issue for some workloads, especially for devices driven by the ipath
driver, which needs to call into the kernel even for datapath
operations.

Fix this by adding reference counts to the userspace objects, and then
converting ib_uverbs_idr_mutex into a spinlock that only protects the
idrs long enough to take a reference on the object being looked up.
Because remove operations may fail, we have to do a slightly funky
two-step deletion, which is described in the comments at the top of
uverbs_cmd.c.

This also still leaves ib_uverbs_idr_lock as a single lock that is
possibly subject to contention.  However, the lock hold time will only
be a single idr operation, so multiple threads should still be able to
make progress, even if ib_uverbs_idr_lock is being ping-ponged.

Surprisingly, these changes even shrink the object code:

add/remove: 23/5 grow/shrink: 4/21 up/down: 633/-693 (-60)

Signed-off-by: Roland Dreier &lt;rolandd@cisco.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>IB/uverbs: Support for query SRQ from userspace</title>
<updated>2006-03-20T18:08:14+00:00</updated>
<author>
<name>Dotan Barak</name>
<email>dotanb@mellanox.co.il</email>
</author>
<published>2006-02-14T00:31:57+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus2008.git/commit/?id=8bdb0e8632e0f5061bd18b6934346cb609490135'/>
<id>8bdb0e8632e0f5061bd18b6934346cb609490135</id>
<content type='text'>
Add support to uverbs to handle querying userspace SRQs (shared
receive queues), including adding an ABI for marshalling requests and
responses.  The kernel midlayer already has the underlying
ib_query_srq() function.

Signed-off-by: Dotan Barak &lt;dotanb@mellanox.co.il&gt;
Signed-off-by: Roland Dreier &lt;rolandd@cisco.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add support to uverbs to handle querying userspace SRQs (shared
receive queues), including adding an ABI for marshalling requests and
responses.  The kernel midlayer already has the underlying
ib_query_srq() function.

Signed-off-by: Dotan Barak &lt;dotanb@mellanox.co.il&gt;
Signed-off-by: Roland Dreier &lt;rolandd@cisco.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>IB/uverbs: Support for query QP from userspace</title>
<updated>2006-03-20T18:08:14+00:00</updated>
<author>
<name>Dotan Barak</name>
<email>dotanb@mellanox.co.il</email>
</author>
<published>2006-02-14T00:31:25+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus2008.git/commit/?id=7ccc9a24e01258a31ee2b964215e4ddddd2a02c4'/>
<id>7ccc9a24e01258a31ee2b964215e4ddddd2a02c4</id>
<content type='text'>
Add support to uverbs to handle querying userspace QPs (queue pairs),
including adding an ABI for marshalling requests and responses.  The
kernel midlayer already has the underlying ib_query_qp() function.

Signed-off-by: Dotan Barak &lt;dotanb@mellanox.co.il&gt;
Signed-off-by: Roland Dreier &lt;rolandd@cisco.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add support to uverbs to handle querying userspace QPs (queue pairs),
including adding an ABI for marshalling requests and responses.  The
kernel midlayer already has the underlying ib_query_qp() function.

Signed-off-by: Dotan Barak &lt;dotanb@mellanox.co.il&gt;
Signed-off-by: Roland Dreier &lt;rolandd@cisco.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>IB: Add userspace support for resizing CQs</title>
<updated>2006-03-20T18:08:07+00:00</updated>
<author>
<name>Roland Dreier</name>
<email>rolandd@cisco.com</email>
</author>
<published>2006-01-30T22:29:21+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus2008.git/commit/?id=33b9b3ee9709b19c4f02ab91571d53540d05c3d1'/>
<id>33b9b3ee9709b19c4f02ab91571d53540d05c3d1</id>
<content type='text'>
Add support to uverbs to handle resizing userspace CQs (completion
queues), including adding an ABI for marshalling requests and
responses.  The kernel midlayer already has ib_resize_cq().

Signed-off-by: Roland Dreier &lt;rolandd@cisco.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add support to uverbs to handle resizing userspace CQs (completion
queues), including adding an ABI for marshalling requests and
responses.  The kernel midlayer already has ib_resize_cq().

Signed-off-by: Roland Dreier &lt;rolandd@cisco.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>IB: convert from semaphores to mutexes</title>
<updated>2006-01-13T22:51:39+00:00</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2006-01-13T22:51:39+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus2008.git/commit/?id=95ed644fd12f53c6fc778f3f246974e5fe3a9468'/>
<id>95ed644fd12f53c6fc778f3f246974e5fe3a9468</id>
<content type='text'>
semaphore to mutex conversion by Ingo and Arjan's script.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
[ Sanity-checked on real IB hardware ]
Signed-off-by: Roland Dreier &lt;rolandd@cisco.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
semaphore to mutex conversion by Ingo and Arjan's script.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
[ Sanity-checked on real IB hardware ]
Signed-off-by: Roland Dreier &lt;rolandd@cisco.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>IB/uverbs: track multicast group membership for userspace QPs</title>
<updated>2005-11-30T00:57:01+00:00</updated>
<author>
<name>Jack Morgenstein</name>
<email>jackm@mellanox.co.il</email>
</author>
<published>2005-11-30T00:57:01+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus2008.git/commit/?id=f4e401562c11c7ca65592ebd749353cf0b19af7b'/>
<id>f4e401562c11c7ca65592ebd749353cf0b19af7b</id>
<content type='text'>
uverbs needs to track which multicast groups is each qp
attached to, in order to properly detach when cleanup
is performed on device file close.

Signed-off-by: Jack Morgenstein &lt;jackm@mellanox.co.il&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@mellanox.co.il&gt;
Signed-off-by: Roland Dreier &lt;rolandd@cisco.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
uverbs needs to track which multicast groups is each qp
attached to, in order to properly detach when cleanup
is performed on device file close.

Signed-off-by: Jack Morgenstein &lt;jackm@mellanox.co.il&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@mellanox.co.il&gt;
Signed-off-by: Roland Dreier &lt;rolandd@cisco.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IB] uverbs: Avoid NULL pointer deref on CQ async event</title>
<updated>2005-10-31T15:10:32+00:00</updated>
<author>
<name>Roland Dreier</name>
<email>rolandd@cisco.com</email>
</author>
<published>2005-10-30T17:50:04+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus2008.git/commit/?id=7162a3e0db34e914a8bc5bf74bbae0b386310cf8'/>
<id>7162a3e0db34e914a8bc5bf74bbae0b386310cf8</id>
<content type='text'>
Userspace CQs that have no completion event channel attached end up
with their cq_context set to NULL.  However, asynchronous events like
"CQ overrun" can still occur on such CQs, so add a uverbs_file member
to struct ib_ucq_object that we can follow to deliver these events.

Signed-off-by: Roland Dreier &lt;rolandd@cisco.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Userspace CQs that have no completion event channel attached end up
with their cq_context set to NULL.  However, asynchronous events like
"CQ overrun" can still occur on such CQs, so add a uverbs_file member
to struct ib_ucq_object that we can follow to deliver these events.

Signed-off-by: Roland Dreier &lt;rolandd@cisco.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IB] uverbs: Fix device lifetime problems</title>
<updated>2005-10-28T22:38:26+00:00</updated>
<author>
<name>Roland Dreier</name>
<email>rolandd@cisco.com</email>
</author>
<published>2005-10-28T22:38:26+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus2008.git/commit/?id=70a30e16a8a9d22396a4d1e96af86e43594df584'/>
<id>70a30e16a8a9d22396a4d1e96af86e43594df584</id>
<content type='text'>
Move ib_uverbs module to using cdev_alloc() and class_device_create()
so that we can handle device lifetime properly.  Now we can make sure
we keep all of our data structures around until the last way to reach
them is gone.

Signed-off-by: Roland Dreier &lt;rolandd@cisco.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move ib_uverbs module to using cdev_alloc() and class_device_create()
so that we can handle device lifetime properly.  Now we can make sure
we keep all of our data structures around until the last way to reach
them is gone.

Signed-off-by: Roland Dreier &lt;rolandd@cisco.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IB] uverbs: Implement more commands</title>
<updated>2005-10-17T22:20:31+00:00</updated>
<author>
<name>Roland Dreier</name>
<email>rolandd@cisco.com</email>
</author>
<published>2005-10-14T22:26:04+00:00</published>
<link rel='alternate' type='text/html' href='http://rtsrv.cs.unc.edu/cgit/cgit.cgi/litmus2008.git/commit/?id=67cdb40ca444c09853ab4d8a41cf547ac26a4de4'/>
<id>67cdb40ca444c09853ab4d8a41cf547ac26a4de4</id>
<content type='text'>
Add kernel support for userspace calling poll CQ, request CQ
notification, post send, post receive, post SRQ receive, create AH and
destroy AH commands.  These commands allow us to support userspace
verbs for devices that can't perform these operations directly from
userspace (eg the PathScale HCA).

Signed-off-by: Roland Dreier &lt;rolandd@cisco.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add kernel support for userspace calling poll CQ, request CQ
notification, post send, post receive, post SRQ receive, create AH and
destroy AH commands.  These commands allow us to support userspace
verbs for devices that can't perform these operations directly from
userspace (eg the PathScale HCA).

Signed-off-by: Roland Dreier &lt;rolandd@cisco.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
