[all-commits] [llvm/llvm-project] c8c19e: [libc] Fix RPC interface when sending and recievin...
Joseph Huber via All-commits
all-commits at lists.llvm.org
Wed May 10 16:52:01 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c8c19e1c31452c93acd3b9c4db5d9ea1c25a4582
https://github.com/llvm/llvm-project/commit/c8c19e1c31452c93acd3b9c4db5d9ea1c25a4582
Author: Joseph Huber <jhuber6 at vols.utk.edu>
Date: 2023-05-10 (Wed, 10 May 2023)
Changed paths:
M libc/src/__support/RPC/rpc.h
M libc/test/integration/startup/gpu/CMakeLists.txt
A libc/test/integration/startup/gpu/rpc_interface_test.cpp
M libc/utils/gpu/loader/Server.h
Log Message:
-----------
[libc] Fix RPC interface when sending and recieving aribtrary packets
The interface exported by the RPC library allows users to simply send
and recieve fixed sized packets without worrying about the data motion
underneath. However, this was broken in the current implementation. We
can think of the send and recieve implementations in terms of waiting
for ownership of the buffer, using the buffer, and posting ownership to
the other side. Our implementation of `recv` was incorrect in the
following scenarios.
recv -> send // we still own the buffer and should give away ownership
recv -> close // The other side is not waiting for data, this will
result in multiple openings of the same port
This patch attempts to fix this with an admittedly hacky fix where we
track if the previous implementation was a recv and post conditionally.
Reviewed By: JonChesterfield
Differential Revision: https://reviews.llvm.org/D150327
More information about the All-commits
mailing list