summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc
diff options
context:
space:
mode:
authorChuck Lever <cel@kernel.org>2026-09-08 09:42:31 -0400
committerChuck Lever <cel@kernel.org>2026-10-04 21:15:29 -0400
commit08989c3e551f2d16f2615c204453b76348dd6bf9 (patch)
treeb0a0d428fcb379cc3ea0b914b005a7e7f104c115 /rust/kernel/alloc
parent712260f4c438664f407d77edca0a32459f625827 (diff)
xdrgen: Extend the pages directive to page-resident arguments
The pages directive so far drives only the encoder. A bulk argument such as the payload of an NFS WRITE arrives in the pages of the server's Receive buffer, but the generated opaque decoder copies it into a contiguous data pointer. The copy wastes memory bandwidth and forces the containing procedure decoder to be hand-rolled. Let the directive drive the decoder as well. Whether a marked member is decoded in place or encoded by reference follows from whether its containing type is reachable from an RPC procedure argument. Record that set during parsing, then close it over nested aggregates and typedef aliases before the directives are checked. A decoded page-resident member is represented as a struct xdr_buf so that the payload can be handed on without a copy. A marked union arm of an argument type is rejected, since the union generator still emits only the copying decoder. A marked type reachable from both an argument and a result is rejected as well: the two representations differ, and a type carries only one. Acked-by: Jeff Layton <jlayton@kernel.org> Link: https://patch.msgid.link/20260908134234.512312-8-cel@kernel.org Signed-off-by: Chuck Lever <cel@kernel.org>
Diffstat (limited to 'rust/kernel/alloc')
0 files changed, 0 insertions, 0 deletions