Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp1021647rdf; Wed, 22 Nov 2023 03:40:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IEhSs/1/MYB3xkhEA5KE6fMVah3W75Pwo1V/0jLNJaAxBEuSFSN43uhoD73tNfR3dGe7ipm X-Received: by 2002:a17:902:d4ca:b0:1cf:5197:25ac with SMTP id o10-20020a170902d4ca00b001cf519725acmr8105077plg.12.1700653245336; Wed, 22 Nov 2023 03:40:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700653245; cv=none; d=google.com; s=arc-20160816; b=QyjMgqZC7NSZOGdjU0qASifOmJQZcrBm+aNT2JC3zt55FE5ORc4XY8jM3MpPVsJuM2 J2wOjpD6A+Xv9iuMM2JazxUaZiidfiwOf408z9VWH9SNKRIWBbBLGuMqTmFbLwO0pFOy WIoYVRLyhp1/X+pnyZhceBBNsVQwCQ6DnCYFMK6HGz2UIS6JnI1R6KXUeB7IK/1i2gmt gFFMoF/18UWiZ7u1tllgXYATC/LJkoVfKHXHDPe5fmcwc+XgC4ULvKAs0CAEe8YYnPWt HbT8xU73YItork5bAJ7kqTzoXWO5+lVqYREiuXE+GjjRuYsnm5HDWMvuXvDURo/njZ6b V51w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=t8ZHkL+vOhWC7lfOfZuLtDnUg0mdshZNMsXOJyvoWqk=; fh=O2YIzIIScX37NosdhANsPCPVfGb+i3j1ssERzDfKzXc=; b=Inaqf0u9q3O0UGnA3i7/LG/MGkPhrncl8sgxbKvYkWPGlwRdgvl2YXG+i8GhSaTnGT hl4B+5Qvt3wo+8riiSbf2ewD1Q9hNDBDQnbjmjapC7o6aZ6DuSjhSM71ILGBKhRQY4t1 e6zONNOHsW2BrKXI2znoN8JlDN3w8AKEPw7KJ+iajkYqJkDpR6bMeOUieV9RoNHSOFDw 9GEN/Z4O4ntC6z+FjXpQKMql8dToY1qdTWPABpun55DLLNhpUzg3qiu3HTX0/xzAoeGU nOPL3XgTY+CXm3RSlPzkA6F+PtYD1GRHV8OQgP6y8ed1qWYuOmQVaD1HlxCNtsxYnvUT sjbQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id u24-20020a63df18000000b005bd70a177a3si12604048pgg.876.2023.11.22.03.40.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 03:40:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id E44A18127252; Wed, 22 Nov 2023 03:40:41 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343798AbjKVLkY (ORCPT + 99 others); Wed, 22 Nov 2023 06:40:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343800AbjKVLkX (ORCPT ); Wed, 22 Nov 2023 06:40:23 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2A0EED4A for ; Wed, 22 Nov 2023 03:40:19 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A5D531595; Wed, 22 Nov 2023 03:41:05 -0800 (PST) Received: from FVFF77S0Q05N (unknown [10.57.43.26]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id ED7423F7A6; Wed, 22 Nov 2023 03:40:16 -0800 (PST) Date: Wed, 22 Nov 2023 11:40:09 +0000 From: Mark Rutland To: Will Deacon Cc: Huang Shijie , catalin.marinas@arm.com, suzuki.poulose@arm.com, broonie@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, anshuman.khandual@arm.com, robh@kernel.org, oliver.upton@linux.dev, maz@kernel.org, patches@amperecomputing.com Subject: Re: [PATCH 0/4] arm64: an optimization for AmpereOne Message-ID: References: <20231122092855.4440-1-shijie@os.amperecomputing.com> <20231122094857.GA2959@willie-the-truck> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231122094857.GA2959@willie-the-truck> X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 22 Nov 2023 03:40:42 -0800 (PST) On Wed, Nov 22, 2023 at 09:48:57AM +0000, Will Deacon wrote: > On Wed, Nov 22, 2023 at 05:28:51PM +0800, Huang Shijie wrote: > > 0) Background: > > We found that AmpereOne benefits from aggressive prefetches when > > using 4K page size. > > We tend to shy away from micro-architecture specific optimisations in > the arm64 kernel as they're pretty unmaintainable, hard to test properly, > generally lead to bloat and add additional obstacles to updating our > library routines. > > Admittedly, we have something for Thunder-X1 in copy_page() (disguised > as ARM64_HAS_NO_HW_PREFETCH) but, frankly, that machine needed all the > help it could get and given where it is today I suspect we could drop > that code without any material consequences. > > So I'd really prefer not to merge this; modern CPUs should do better at > copying data. It's copy_to_user(), not rocket science. I agree, and I'd also like to drop ARM64_HAS_NO_HW_PREFETCH. Mark.