From: Gabriel Krisman Bertazi <krisman@suse.de>
To: Will Deacon <will@kernel.org>
Cc: catalin.marinas@arm.com, linux-arm-kernel@lists.infradead.org,
broonie@kernel.org
Subject: Re: [RFC PATCH] arm64: Cache HW update of Access Flag support
Date: Mon, 09 Jan 2023 12:16:13 -0300 [thread overview]
Message-ID: <87lembg2ma.fsf@suse.de> (raw)
In-Reply-To: <20230106170949.GA5019@willie-the-truck> (Will Deacon's message of "Fri, 6 Jan 2023 17:09:50 +0000")
Will Deacon <will@kernel.org> writes:
> On Fri, Jan 06, 2023 at 01:38:25PM -0300, Gabriel Krisman Bertazi wrote:
>> + has_af = cpuid_feature_extract_unsigned_field(
>> + read_cpuid(ID_AA64MMFR1_EL1),
>> ID_AA64MMFR1_EL1_HAFDBS_SHIFT);
>> + return has_af;
>
> The intention here was to read the value for the _current_ CPU, since it
> might not be the same across the system when big.MISTAKE gets involved.
>
> However, since this is really just a performance optimisation and I
> think that the access flag tends to be uniformly supported in practice
> anyway, the best bet is probably just to read the sanitised version of
> the field using read_sanitised_ftr_reg().
>
> Can you give that a shot, please?
Hey Will,
Thanks for the review.
I reran the benchmark over the weekend and the impact of the bsearch
lookup seems to be <1% worse than my original patch, which is
negligible, IMO. I will shortly follow up with a v2 applying your
suggestion.
Thanks!
--
Gabriel Krisman Bertazi
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-01-09 15:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-06 16:38 [RFC PATCH] arm64: Cache HW update of Access Flag support Gabriel Krisman Bertazi
2023-01-06 17:09 ` Will Deacon
2023-01-09 15:16 ` Gabriel Krisman Bertazi [this message]
2023-01-10 16:16 ` Will Deacon
2023-01-10 19:38 ` Gabriel Krisman Bertazi
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=87lembg2ma.fsf@suse.de \
--to=krisman@suse.de \
--cc=broonie@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=will@kernel.org \
/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.