<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/include/linux/sunrpc/svc_rdma.h, branch linux-6.5.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.5.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.5.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2023-06-12T16:16:36Z</updated>
<entry>
<title>svcrdma: Revert 2a1e4f21d841 ("svcrdma: Normalize Send page handling")</title>
<updated>2023-06-12T16:16:36Z</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2023-06-12T14:10:14Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c4b50cdf9d9d7962d58ece5efba865f56ec40398'/>
<id>urn:sha1:c4b50cdf9d9d7962d58ece5efba865f56ec40398</id>
<content type='text'>
Get rid of the completion wait in svc_rdma_sendto(), and release
pages in the send completion handler again. A subsequent patch will
handle releasing those pages more efficiently.

Reverted by hand: patch -R would not apply cleanly.

Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
</content>
</entry>
<entry>
<title>SUNRPC: Revert 579900670ac7 ("svcrdma: Remove unused sc_pages field")</title>
<updated>2023-06-12T16:16:36Z</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2023-06-12T14:10:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a944209c11aff9a5c9b7987fc958cc2344dca51f'/>
<id>urn:sha1:a944209c11aff9a5c9b7987fc958cc2344dca51f</id>
<content type='text'>
Pre-requisite for releasing pages in the send completion handler.
Reverted by hand: patch -R would not apply cleanly.

Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
</content>
</entry>
<entry>
<title>svcrdma: Clean up allocation of svc_rdma_recv_ctxt</title>
<updated>2023-06-12T16:16:35Z</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2023-06-05T13:11:30Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c5d68d25bd6b5798bf0eb96661e1b26748e970d7'/>
<id>urn:sha1:c5d68d25bd6b5798bf0eb96661e1b26748e970d7</id>
<content type='text'>
The physical device's favored NUMA node ID is available when
allocating a recv_ctxt. Use that value instead of relying on the
assumption that the memory allocation happens to be running on a
node close to the device.

This clean up eliminates the hack of destroying recv_ctxts that
were not created by the receive CQ thread -- recv_ctxts are now
always allocated on a "good" node.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
</content>
</entry>
<entry>
<title>SUNRPC: always free ctxt when freeing deferred request</title>
<updated>2023-05-14T19:55:02Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2023-05-08T23:42:47Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=948f072ada23e0a504c5e4d7d71d4c83bd0785ec'/>
<id>urn:sha1:948f072ada23e0a504c5e4d7d71d4c83bd0785ec</id>
<content type='text'>
Since the -&gt;xprt_ctxt pointer was added to svc_deferred_req, it has not
been sufficient to use kfree() to free a deferred request.  We may need
to free the ctxt as well.

As freeing the ctxt is all that -&gt;xpo_release_rqst() does, we repurpose
it to explicit do that even when the ctxt is not stored in an rqst.
So we now have -&gt;xpo_release_ctxt() which is given an xprt and a ctxt,
which may have been taken either from an rqst or from a dreq.  The
caller is now responsible for clearing that pointer after the call to
-&gt;xpo_release_ctxt.

We also clear dr-&gt;xprt_ctxt when the ctxt is moved into a new rqst when
revisiting a deferred request.  This ensures there is only one pointer
to the ctxt, so the risk of double freeing in future is reduced.  The
new code in svc_xprt_release which releases both the ctxt and any
rq_deferred depends on this.

Fixes: 773f91b2cf3f ("SUNRPC: Fix NFSD's request deferral on RDMA transports")
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Reviewed-by: Jeff Layton &lt;jlayton@kernel.org&gt;
Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
</content>
</entry>
<entry>
<title>svcrdma: Convert rdma-&gt;sc_rw_ctxts to llist</title>
<updated>2021-08-17T15:47:53Z</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2021-02-08T20:33:16Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=07a92d009f0b1557d3d58905ce18821a483be2e1'/>
<id>urn:sha1:07a92d009f0b1557d3d58905ce18821a483be2e1</id>
<content type='text'>
Relieve contention on sc_rw_ctxt_lock by converting rdma-&gt;sc_rw_ctxts
to an llist.

The goal is to reduce the average overhead of Send completions,
because a transport's completion handlers are single-threaded on
one CPU core. This change reduces CPU utilization of each Send
completion by 2-3% on my server.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Reviewed-By: Tom Talpey &lt;tom@talpey.com&gt;
</content>
</entry>
<entry>
<title>svcrdma: Relieve contention on sc_send_lock.</title>
<updated>2021-08-17T15:47:53Z</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2021-02-09T15:32:20Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b6c2bfea096ba22583f1071c10ce0745804b9b95'/>
<id>urn:sha1:b6c2bfea096ba22583f1071c10ce0745804b9b95</id>
<content type='text'>
/proc/lock_stat indicates the the sc_send_lock is heavily
contended when the server is under load from a single client.

To address this, convert the send_ctxt free list to an llist.
Returning an item to the send_ctxt cache is now waitless, which
reduces the instruction path length in the single-threaded Send
handler (svc_rdma_wc_send).

The goal is to enable the ib_comp_wq worker to handle a higher
RPC/RDMA Send completion rate given the same CPU resources. This
change reduces CPU utilization of Send completion by 2-3% on my
server.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Reviewed-By: Tom Talpey &lt;tom@talpey.com&gt;
</content>
</entry>
<entry>
<title>svcrdma: Fewer calls to wake_up() in Send completion handler</title>
<updated>2021-08-17T15:47:53Z</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2021-07-07T18:57:28Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6c8c84f525100a1cade5698320b4abe43062e159'/>
<id>urn:sha1:6c8c84f525100a1cade5698320b4abe43062e159</id>
<content type='text'>
Because wake_up() takes an IRQ-safe lock, it can be expensive,
especially to call inside of a single-threaded completion handler.
What's more, the Send wait queue almost never has waiters, so
most of the time, this is an expensive no-op.

As always, the goal is to reduce the average overhead of each
completion, because a transport's completion handlers are single-
threaded on one CPU core. This change reduces CPU utilization of
the Send completion thread by 2-3% on my server.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Reviewed-By: Tom Talpey &lt;tom@talpey.com&gt;
</content>
</entry>
<entry>
<title>svcrdma: Remove svc_rdma_recv_ctxt::rc_pages and ::rc_arg</title>
<updated>2021-03-31T19:57:48Z</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2021-01-13T14:31:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5533c4f4b996b7fc36d16b5e0807ebbc08c93af4'/>
<id>urn:sha1:5533c4f4b996b7fc36d16b5e0807ebbc08c93af4</id>
<content type='text'>
These fields are no longer used.

The size of struct svc_rdma_recv_ctxt is now less than 300 bytes on
x86_64, down from 2440 bytes.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
</content>
</entry>
<entry>
<title>svcrdma: Remove sc_read_complete_q</title>
<updated>2021-03-31T19:57:48Z</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2020-12-30T17:43:34Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9af723be863904c746a6a6bf4f3686087b16b9ff'/>
<id>urn:sha1:9af723be863904c746a6a6bf4f3686087b16b9ff</id>
<content type='text'>
Now that svc_rdma_recvfrom() waits for Read completion,
sc_read_complete_q is no longer used.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
</content>
</entry>
<entry>
<title>svcrdma: Remove unused sc_pages field</title>
<updated>2021-03-22T17:22:13Z</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2021-01-28T21:47:56Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=579900670ac770a547ff607a60c02c56a7d27bd7'/>
<id>urn:sha1:579900670ac770a547ff607a60c02c56a7d27bd7</id>
<content type='text'>
Clean up. This significantly reduces the size of struct
svc_rdma_send_ctxt.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;

</content>
</entry>
</feed>
