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 73B00C54798 for ; Tue, 27 Feb 2024 20:27:00 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7IC+/8EoG3hx0edwpKOo5p/pZ8Iv35csZFrbMy/ONBg=; b=rclXxcHdpTvXHi ObxD1ZFRx29H8Nz2DmcCjX+RNgUZl5op5cWioiwvV90OI/kkFsKQA0T2ueEJQ1YCKbITCwrBQvsOR nh69/GPhtV2wBTQv1yZPqFllEmoxzMGRYAnmp6iqkq6nKJXN6pwl114NfOyR73pQs23EJVDbjY7ch 42WgtuuNta2sEyeKV8/Q6ItCGLLqlI7bGo6HRBD3QF3zYUl0O7YndN4aAEPHgVBBIKnwcdV1tPS9B UQFLsPkbMnY1FxICwLpRJXCjQ4AIwQ9+FtiWOF9FBOaVwDTBtOHYTtHn0W1Y0BvfddXT94tAxPXCK 0CVHVBSsdrku/pImt21g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rf42K-00000006lCZ-1RJO; Tue, 27 Feb 2024 20:26:48 +0000 Received: from out-173.mta1.migadu.com ([2001:41d0:203:375::ad]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rf42H-00000006lBG-0atq for linux-arm-kernel@lists.infradead.org; Tue, 27 Feb 2024 20:26:46 +0000 Date: Tue, 27 Feb 2024 20:26:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1709065599; h=from:from:reply-to:subject:subject: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=sdw1puFlbNlHUYaiFr/sDKEHRN2itqNfYyV2O0hyzVM=; b=FBGdxf0/6LIvQI8sIuws8hVaxLlZ89fe7AjRV0bLbqh4BDmPKWkEW40uT/zR6fKP0dxqjT pZCAKxMtm1aWyird4Lz7+CBzrwDzNZaZmiObRDYx7OotZkfztZHZn+hIT+T/SwFwwHNnXA 9hpHsOsind2LxoHj+BvaBh71kYR+gTQ= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Catalin Marinas Cc: Ganapatrao Kulkarni , kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, maz@kernel.org, will@kernel.org, suzuki.poulose@arm.com, james.morse@arm.com, corbet@lwn.net, boris.ostrovsky@oracle.com, darren@os.amperecomputing.com, d.scott.phillips@amperecomputing.com Subject: Re: [PATCH] arm64: errata: Minimize tlb flush due to vttbr writes on AmpereOne Message-ID: References: <20240207090458.463021-1-gankulkarni@os.amperecomputing.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240227_122645_609231_B7C0DD3A X-CRM114-Status: GOOD ( 21.38 ) 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 On Tue, Feb 27, 2024 at 08:11:22PM +0000, Catalin Marinas wrote: > On Wed, Feb 07, 2024 at 09:45:59AM +0000, Oliver Upton wrote: [...] > > Think of the precedent this would establish. What would stop > > implementers from, say, changing out our memcpy implementation into a > > a hundred different uarch-specific routines. That isn't maintainable, > > nor is it even testable as most folks don't have access to your > > hardware. > > I agree. FTR, I'm fine with uarch optimisations if (a) they don't > run-time patch the kernel binary, (b) don't affect the existing hardware > and (c) show significant gains on the targeted uarch in some meaningful > benchmarks (definitely not microbenchmark hammering a certain kernel > path). and (d) they have a minimal, maintainable code footprint :) > So, if one wants an optimisation, it better benefits the other > implementations or at least it doesn't make them worse. Now, we do have > hardware from mobiles to large enterprise systems, so at some point we > may have to make a call on different kernel behaviours, possibly even at > run-time. We already do this at build-time, e.g. CONFIG_NUMA where it > doesn't make much sense in a mobile (yet). But they should not be seen > as uarch specific tweaks, more like higher-level classes of > optimisations. Agreed. I think the way we handled this case is a great example of how these sort of things should go -- a general improvement to how the stage-2 MMU gets loaded on VHE systems, which ought to benefit other implementations too. Only if we can't extract a generalization should we even think about something implementation-specific, IMO. -- Thanks, Oliver _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel