[libc] Cache ownership of the shared buffer in the port
authorJoseph Huber <jhuber6@vols.utk.edu>
Mon, 15 May 2023 21:22:27 +0000 (16:22 -0500)
committerJoseph Huber <jhuber6@vols.utk.edu>
Mon, 15 May 2023 11:16:23 +0000 (06:16 -0500)
commit45b899b92f5762c15d435e58666f5eee18e73b40
tree0f766267d2a15c0797280dff8fef7e5e7a17fd3a
parent9417d9fc38c81e1c13aec49f81fa7bf93c9a4bb6
[libc] Cache ownership of the shared buffer in the port

This patch adds another variable to cache cases where we know that we
own the buffer. This allows us to skip the atomic load on the inbox
because we already know its state. This is legal immediately after
opening a port, or when sending immediately after a recieve. This
caching nets a significant (~17%) speedup for the basic open, send,
recieve combination.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D150516
libc/src/__support/RPC/rpc.h