[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201110115313.6654141b@carbon>
Date: Tue, 10 Nov 2020 11:53:12 +0100
From: Jesper Dangaard Brouer <brouer@...hat.com>
To: Lorenzo Bianconi <lorenzo@...nel.org>
Cc: netdev@...r.kernel.org, bpf@...r.kernel.org,
lorenzo.bianconi@...hat.com, davem@...emloft.net, kuba@...nel.org,
ilias.apalodimas@...aro.org, brouer@...hat.com
Subject: Re: [PATCH v4 net-next 1/5] net: xdp: introduce bulking for xdp tx
return path
On Fri, 6 Nov 2020 19:19:07 +0100
Lorenzo Bianconi <lorenzo@...nel.org> wrote:
> XDP bulk APIs introduce a defer/flush mechanism to return
> pages belonging to the same xdp_mem_allocator object
> (identified via the mem.id field) in bulk to optimize
> I-cache and D-cache since xdp_return_frame is usually run
> inside the driver NAPI tx completion loop.
> The bulk queue size is set to 16 to be aligned to how
> XDP_REDIRECT bulking works. The bulk is flushed when
> it is full or when mem.id changes.
> xdp_frame_bulk is usually stored/allocated on the function
> call-stack to avoid locking penalties.
> Current implementation considers only page_pool memory model.
>
> Suggested-by: Jesper Dangaard Brouer <brouer@...hat.com>
> Signed-off-by: Lorenzo Bianconi <lorenzo@...nel.org>
> ---
> include/net/xdp.h | 11 ++++++++-
> net/core/xdp.c | 61 +++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 71 insertions(+), 1 deletion(-)
I have a number of optimization improvements to this patch. Mostly
related to simple likely/unlikely compiler annotations, that give
better code layout for I-cache benefit. Details in[1]. (Lorenzo is informed)
[1] https://github.com/xdp-project/xdp-project/blob/master/areas/mem/xdp_bulk_return01.org
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouer
Powered by blists - more mailing lists