From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 96DCFC54EBD for ; Mon, 9 Jan 2023 15:17:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:In-Reply-To: Date:References:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cKO1wmd+GFnGOwbuVDHVOAbWf1M2LZLaJPjHpGEUq5M=; b=ivTky819UKLUnS S9unMFg/NIKGMLDe6hLGSQERRC0ZazhXrygOmv5cipGLLMV1pw8dJ/X5IpKrstM8MDM6+tLeLbC0u iyoXUo9SS0oTry9FFXc6ykyLKTAXKmrbf4UaSLJ/gg/ykepdoqJpZjk7yfzCn7vP32sY/IZKklmr+ +j+rR37VF/eFpp+ISl4UjhoTGtm3pDxbn39w9bA6NiZ7NCZ8LgvSE5159LZhzqN6FG98IZS0BLO8J FZoO6aj0KDc77kxB3yOfr+3F9nagnZpb4/k+DQEdd/HD1gJozZUIeo6giiMp5EREoVcroW90wtm15 hZn7sq4dl4jZsdf7LFuQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pEtsu-002AdS-SU; Mon, 09 Jan 2023 15:16:25 +0000 Received: from smtp-out2.suse.de ([195.135.220.29]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pEtsr-002AbR-O4 for linux-arm-kernel@lists.infradead.org; Mon, 09 Jan 2023 15:16:23 +0000 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 1038B46F4; Mon, 9 Jan 2023 15:16:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1673277377; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=B1TMIlSU3SEHJSrX9oHbZVZpQQOXrR9vGugWPiarTnk=; b=RfPDa2wYYrlzJFGnHQeKkCUVPWMZJN4MiW4E0lULfmV8EnGhaQNGWN7g6kkuOGIBfU4eQB OQu+40akkWksufqKY+Nf98fo9caxWxrOjneedDwkx/Skzc+/OOOVc3FvwhKUV17VSdNIYm xhQaDT/b/WJN/lJHJTAmUJajCWYNS94= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1673277377; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=B1TMIlSU3SEHJSrX9oHbZVZpQQOXrR9vGugWPiarTnk=; b=cB7a/DalDmoWcNwCbNPdhmr2hialrQzWTGeft16xatyL72f5ZkiZFFug7W4dPIaH9zgT68 IOVHIohE4eRe+VDw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 86B15134AD; Mon, 9 Jan 2023 15:16:16 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Ol99EsAvvGOFSQAAMHmgww (envelope-from ); Mon, 09 Jan 2023 15:16:16 +0000 From: Gabriel Krisman Bertazi To: Will Deacon 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 Organization: SUSE References: <20230106163825.4812-1-krisman@suse.de> <20230106170949.GA5019@willie-the-truck> Date: Mon, 09 Jan 2023 12:16:13 -0300 In-Reply-To: <20230106170949.GA5019@willie-the-truck> (Will Deacon's message of "Fri, 6 Jan 2023 17:09:50 +0000") Message-ID: <87lembg2ma.fsf@suse.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230109_071621_965391_341CD333 X-CRM114-Status: GOOD ( 16.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Will Deacon 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