From: Shivang Upadhyay <shivangu@linux.ibm.com>
To: Nikhil Kumar Singh <nikhilks@linux.ibm.com>,
linuxppc-dev@lists.ozlabs.org
Cc: Sourabh Jain <sourabhjain@linux.ibm.com>
Subject: Re: [PATCH v2] powerpc/powernv: Cache OPAL check_token() results
Date: Wed, 08 Jul 2026 14:02:54 +0530 [thread overview]
Message-ID: <fa47cb85e275b9374efbf0f992281fa196ddf8ec.camel@linux.ibm.com> (raw)
In-Reply-To: <1be96e32-ac9c-4160-9f2b-23eb29c22893@linux.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 616 bytes --]
On Tue, 2026-07-07 at 12:36 +0530, Nikhil Kumar Singh wrote:
> You can wrap the if (token_cache[token] == SUPP_UNKNOWN) check, as
> well as the if (token > OPAL_LAST) check above it, with unlikely(),
> since this function is in the hot path. Out-of-bounds tokens are very
> rare, and after the cache is populated, the SUPP_UNKNOWN condition is
> expected to be false in almost all cases. Wrapping these checks with
> unlikely() will help the compiler optimize branch
Thanks for your suggestion, but Which hotpath code is calling this?
we can maybe change that hotpath to not do rtas calls.
~Shivang.
[-- Attachment #2: Type: text/html, Size: 1093 bytes --]
next prev parent reply other threads:[~2026-07-08 8:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-26 12:35 [PATCH v2] powerpc/powernv: Cache OPAL check_token() results Shivang Upadhyay
2026-06-30 13:50 ` Sourabh Jain
2026-07-07 7:06 ` Nikhil Kumar Singh
2026-07-08 8:32 ` Shivang Upadhyay [this message]
2026-07-09 6:04 ` Nikhil Kumar Singh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fa47cb85e275b9374efbf0f992281fa196ddf8ec.camel@linux.ibm.com \
--to=shivangu@linux.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=nikhilks@linux.ibm.com \
--cc=sourabhjain@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.