[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZAX98D91HvKrJBCO@corigine.com>
Date: Mon, 6 Mar 2023 15:51:28 +0100
From: Simon Horman <simon.horman@...igine.com>
To: Jason Xing <kerneljasonxing@...il.com>
Cc: willemdebruijn.kernel@...il.com, davem@...emloft.net,
dsahern@...nel.org, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, bpf@...r.kernel.org,
Jason Xing <kernelxing@...cent.com>
Subject: Re: [PATCH v2 net-next] udp: introduce __sk_mem_schedule() usage
On Mon, Mar 06, 2023 at 07:57:45PM +0800, Jason Xing wrote:
> From: Jason Xing <kernelxing@...cent.com>
>
> Keep the accounting schema consistent across different protocols
> with __sk_mem_schedule(). Besides, it adjusts a little bit on how
> to calculate forward allocated memory compared to before. After
> applied this patch, we could avoid receive path scheduling extra
> amount of memory.
>
> Link: https://lore.kernel.org/lkml/20230221110344.82818-1-kerneljasonxing@gmail.com/
> Signed-off-by: Jason Xing <kernelxing@...cent.com>
> ---
> V2:
> 1) change the title and body message
> 2) use __sk_mem_schedule() instead suggested by Paolo Abeni
> ---
> net/ipv4/udp.c | 31 ++++++++++++++++++-------------
> 1 file changed, 18 insertions(+), 13 deletions(-)
>
> diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
> index 9592fe3e444a..21c99087110d 100644
> --- a/net/ipv4/udp.c
> +++ b/net/ipv4/udp.c
> @@ -1531,10 +1531,23 @@ static void busylock_release(spinlock_t *busy)
> spin_unlock(busy);
> }
>
> +static inline int udp_rmem_schedule(struct sock *sk, int size)
nit: I think it's best to drop the inline keyword and
let the compiler figure that out.
Powered by blists - more mailing lists