[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aNI_-QHAzwrED-iX@gondor.apana.org.au>
Date: Tue, 23 Sep 2025 14:36:41 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Menglong Dong <menglong8.dong@...il.com>
Cc: tgraf@...g.ch, linux-crypto@...r.kernel.org,
linux-kernel@...r.kernel.org, Neil Brown <neil@...wn.name>
Subject: Re: [PATCH] rhashtable: add likely() to __rht_ptr()
Menglong Dong <menglong8.dong@...il.com> wrote:
> In the fast path, the value of "p" in __rht_ptr() should be valid.
> Therefore, wrap it with a "likely". The performance increasing is tiny,
> but it's still worth to do it.
>
> Signed-off-by: Menglong Dong <dongml2@...natelecom.cn>
> ---
> include/linux/rhashtable.h | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
It's not obvious that rht_ptr would be non-NULL. It depends on the
work load. For example, if you're doing a lookup where most keys
are non-existent then it would most likely be NULL.
Cheers,
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists