Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2797717iog; Mon, 27 Jun 2022 03:10:18 -0700 (PDT) X-Google-Smtp-Source: AGRyM1up2JnsO7T1/jJE9MJ2U/kb7xuDt5UnFLYjAInkIbtA0BAO/62tQvR/MNXIUxFZENRQOMN4 X-Received: by 2002:a17:902:e891:b0:16a:6c64:aa59 with SMTP id w17-20020a170902e89100b0016a6c64aa59mr13643929plg.62.1656324618668; Mon, 27 Jun 2022 03:10:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656324618; cv=none; d=google.com; s=arc-20160816; b=Ejyb83mbucpbWpsfctpsUdo72tEF/KCIKypUXGTq4zVSsrsotXRPU0mmKgJgHdhlbf BWdaWngSA8oouNYWC29JaCAuFfJrl65OkC7zaDVEuYf5AerFUt0BCaakw38TNwDR40VX 42eNC9kfDYQbWfeSlBD+ZCeFLT0j0A37PRnOU9+pDiV7OC6RgdR3HfjH9eQqZiH1uNMc HMseK1smZNxKiTjKwvc2btmNwDi7rX7O2FzZplJ113oHWIj1nHp3UQVpBfQOymcfm0k5 nJ8WyHjY6/VKZoPtxHSnnyMblGbqVeU4y3/rOFVpwp0D7aV+DGiSB8A0sR1X6/lltOrH XXHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Z3HaeNcG7GUwNm8/fRozB97Y4i9x1s+O7tYwK4jHD7M=; b=qkc7A/xOYnFi9G2hzvdJxghc+jVC38GsPcoWHxMkXsbwbbO9nexN8GFXn8LD6DFnWJ NANFblsAcMcjyOvcU1XiDaEIUnWhkSGAgWuZdipEq7w3wdh5OZT9jVxcUMC1jvzPR683 2IgqKbth5Bhj7AV+L68Tw+IA7F8Wh7EeBKHvFTxsHHgbR2/iyTlcoa+39zwfgd6v4mvs JlpDuWLDrmQCqsJscvsXlM/ibaAPHfb2K68zC4sNaYu/bGLBiK9XtCi5mj8GrACOpzS+ XjuH5jw/j4M+WwqSohdmiqRQxzg8nhbn1RISKXvh5VA2f/D4mdrJyspDQVjIwAnjTqLs hdNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QF8DGzrv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w13-20020a17090a8a0d00b001dfde430e6asi12756704pjn.18.2022.06.27.03.09.56; Mon, 27 Jun 2022 03:10:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QF8DGzrv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232769AbiF0Jg2 (ORCPT + 99 others); Mon, 27 Jun 2022 05:36:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233712AbiF0Jg0 (ORCPT ); Mon, 27 Jun 2022 05:36:26 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEF2163DC for ; Mon, 27 Jun 2022 02:36:24 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id z13so15505268lfj.13 for ; Mon, 27 Jun 2022 02:36:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Z3HaeNcG7GUwNm8/fRozB97Y4i9x1s+O7tYwK4jHD7M=; b=QF8DGzrvzH59XuF11YGPgC2m9vdevVtFLu4cKsHEkVjP5E0eo/k5PcEn0wMOl4eeY6 Uycf77mBuTJ24IgCm8IhzAUUjCrQm79ID5XfSX9Eg6+CscbLmwa3LvRkzIsrj33PLc0w CUQgHWPSwcdPgGEbbF+AxjKzWVhxDrCKJf7W31rezkmauEpSgHJVRZtVeZVMnVTEcWqW oqx09f24DL1am2dLozxyQtmgIPUGvRZX0BNxuSDG/nECpVsItM8d5b95TocEHhNUVfXB ASDXvIaxD/GHxOb6o9w9Da3cE9BQ+6lHhr6rPARYUyOTlHMa/f3qt3aFtRpFzClUnJQv gMKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Z3HaeNcG7GUwNm8/fRozB97Y4i9x1s+O7tYwK4jHD7M=; b=VyEr3fyoeHOX1qqP7V7KNSClnvf7IfyZALluZnZNYOyITKdi5m7KNY7ero08Ezc3VM MpFEJvQBfQbUOzzs+mD+hQQl+pRvMT1Tbrr7r/O6309RD49pmpMrKsC+0kt5whmnOFhg OhuCpSLmL5suofs8CSY4bOkYs8WbdLno6NpxrfG2paCAw9lIvgeWTIR6fuCjCX9llLUH DAai3Ey2mp3OGJiIBbravV8IRhm9JnP761koZ0dLIIxozaraIoL7p/gOs3o1l8fobpDP JHEkl/Jb601MIW6OMYg0vJmGz+QrtRTki6FmDpGPHq6tp06t6qUV68lyqEZ27ri2fVJM zwtw== X-Gm-Message-State: AJIora/krAiKxmClbdPR5GxhrgcA76JvqiVxwfHW5IuGDgS0Omj7k2EC U0OAxSYa185Ft47Vll6s+tF0acA86w2VMvVzVmhT0g== X-Received: by 2002:ac2:4bcf:0:b0:47f:86f2:812d with SMTP id o15-20020ac24bcf000000b0047f86f2812dmr7505512lfq.400.1656322583045; Mon, 27 Jun 2022 02:36:23 -0700 (PDT) MIME-Version: 1.0 References: <20220607120530.2447112-1-tarumizu.kohei@fujitsu.com> In-Reply-To: From: Linus Walleij Date: Mon, 27 Jun 2022 11:36:11 +0200 Message-ID: Subject: Re: [PATCH v5 0/6] Add hardware prefetch control driver for A64FX and x86 To: "tarumizu.kohei@fujitsu.com" Cc: Greg KH , "catalin.marinas@arm.com" , "will@kernel.org" , "tglx@linutronix.de" , "mingo@redhat.com" , "bp@alien8.de" , "dave.hansen@linux.intel.com" , "x86@kernel.org" , "hpa@zytor.com" , "rafael@kernel.org" , "lenb@kernel.org" , "mchehab+huawei@kernel.org" , "eugenis@google.com" , "tony.luck@intel.com" , "pcc@google.com" , "peterz@infradead.org" , "marcos@orca.pet" , "marcan@marcan.st" , "nicolas.ferre@microchip.com" , "conor.dooley@microchip.com" , "arnd@arndb.de" , "ast@kernel.org" , "peter.chen@kernel.org" , "kuba@kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-acpi@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 17, 2022 at 11:21 AM tarumizu.kohei@fujitsu.com wrote: Jumping in here. > Hi Greg, > > > That's not ok. Linux is a "general purpose" operating system and needs to > > work well for all applications. Doing application-specific-tuning based on the > > specific hardware like this is a nightmare for users, > > Hardware prefetch behavior is enabled by default in x86 and A64FX. > Many applications can perform well without changing the register > setting. Use this feature for some applications that want to be > improved performance. The right way to solve this is to make the Linux kernel contain the necessary heuristics to identify which tasks and thus cores need this to improve efficiency and then apply it automatically. Putting it in userspace is making a human do a machines job which isn't sustainable. By putting the heuristics in kernelspace Linux will improve performance also on workloads the human operator didn't think of as the machine will detect them from statictical or other behaviour patterns. Yours, Linus Walleij