Thread (1 message) 1 message, 1 author, 2024-10-30

Re: [PATCH 2/2] dim: pass dim_sample to net_dim() by reference

From: Jakub Kicinski <kuba@kernel.org>
Date: 2024-10-30 23:48:09
Also in: intel-wired-lan, linux-doc, linux-mediatek, linux-rdma, linuxppc-dev, lkml, netdev

On Wed, 30 Oct 2024 13:49:08 -0600 Caleb Sander Mateos wrote:
net_dim() is currently passed a struct dim_sample argument by value.
struct dim_sample is 24 bytes. Since this is greater 16 bytes, x86-64
passes it on the stack. All callers have already initialized dim_sample
on the stack, so passing it by value requires pushing a duplicated copy
to the stack. Either witing to the stack and immediately reading it, or
perhaps dereferencing addresses relative to the stack pointer in a chain
of push instructions, seems to perform quite poorly.
Looks like patch 1 didn't get CCed to netdev. Please repost?
-- 
pw-bot: cr
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help