Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp970702rdf; Wed, 22 Nov 2023 01:51:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IEif1BBMtxlwv2jhU2HFngRGgoCq3+LKV4lv2n2CZA6YavHBBApr7UVVrIYB2rWnOdVSZn2 X-Received: by 2002:a05:6a20:244b:b0:133:1d62:dcbd with SMTP id t11-20020a056a20244b00b001331d62dcbdmr7447067pzc.28.1700646702229; Wed, 22 Nov 2023 01:51:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700646702; cv=none; d=google.com; s=arc-20160816; b=kMZ72qs7MWf6QWUwe+bvCEdNWH360OMPxWe6wwDD2uMoSJZoDGol9/vaYy80c8HdCH ux1rANrIFkU3Bf59h/YI7HS91vA1LVYAc32itW8lZIWYG7eaF/RcaMKZltmqAz+riPq0 FJPM01cmeVJ4UFcoVNh2NvxvtoFId76VjPx0vMZgqScyW7H1kcTzinXey2CXU9G9s9xO +5mvM3qCFFF3B7X2elUM8Wa5Nr5ixWf+X0zcjJzTabVZjr5uz2JF5Tbh/WzK1POJXmAX rVNP2xKu+5GxTDV4E3RQ0VdnQeOccQdo32XpRuocnARJ2PQDY7e8UFvP9AzJepFZxP3h y4vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=/QqG1dwIQcZ+9n3lURQQEW8Qp1PiCMDTYsC/qO6qazQ=; fh=h5RP2apZShQxC2Vh2b9BeiOhOxPHgfoL+ST+sKT0178=; b=ifyPNAFX2ifp2vHpOQGX0+7fjidGxaSK7opEezy4iYYd/MswtzGgWr76tNXgrlJrLh EMMQ54LvOMrzLor0xZRChrXu6BELMsYu7YhGEb6ql3jNvYmKA7gUWQe22KQ/Vum9bCsc +8xrk8ad78ccO3C8nGslNF53bMrXTn5aUFUAqR2GWLUHEFw2/PtOn9aOPizwSudDpjrs nPmEuVAn3otVd9zbGPt/EE5ozlB28SoYt5RpItnjsCq1Dx0HzaxASIVc/83GbQfHO8qc kxnNaZXgBuW0ZnqKay71CHJRCsmvLGjH4Xi2ss2kvC+VoI4p9CwRgLYJOAUeZGzZVcD4 pCaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=I7U8cpjF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id j36-20020a635524000000b005ad5178d053si12192989pgb.347.2023.11.22.01.51.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 01:51:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=I7U8cpjF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id DE85781F967C; Wed, 22 Nov 2023 01:51:39 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343674AbjKVJuy (ORCPT + 99 others); Wed, 22 Nov 2023 04:50:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235374AbjKVJuP (ORCPT ); Wed, 22 Nov 2023 04:50:15 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4D083256 for ; Wed, 22 Nov 2023 01:49:03 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E0048C433CB; Wed, 22 Nov 2023 09:49:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700646543; bh=HquTgPuZlA4Yd/i15aPhlrVGsHZcZNtBHiTfzoBfy24=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=I7U8cpjF5LN+Br7G9Bfg6N2BL/ceOCkIYMQ+CUFRDVjQhiF8BsTxZfTW89k7TKlm/ CdD4+fAwkVRkZRzvcYqsA6lJYvWgMzEF/pcbEdIzXoqfgY6MHic7G67nPmuhoC0yNy O1KwSEXIKxPpTNxZxIDPVu4FFnaPkj5cfsoNwI72bQjsK/rwy/E+3+j20AVZO0E2m9 w6LTT++PeHx7h/9cgJ727JFaX7KmQC2r0kwK+bs2be9QNPySg7oA4jbbcA8YzXoOJ7 UC1uJGnY9iE6B8Q/rtgufLehrmwIl4p2QkRHFxOS4dCT5Wj3qrgzVbhkS4aTOL/Ry2 fcFjdc5RVYSPA== Date: Wed, 22 Nov 2023 09:48:57 +0000 From: Will Deacon To: Huang Shijie Cc: catalin.marinas@arm.com, mark.rutland@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: <20231122094857.GA2959@willie-the-truck> References: <20231122092855.4440-1-shijie@os.amperecomputing.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231122092855.4440-1-shijie@os.amperecomputing.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Wed, 22 Nov 2023 01:51:40 -0800 (PST) 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. Will