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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64BB0C433EF for ; Mon, 27 Jun 2022 09:37:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234045AbiF0Jg2 (ORCPT ); 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-Google-Smtp-Source: AGRyM1vYmbCQxG+ZhuBiTxL9XeaO2JU+1o3ytJ35pL/oYBvWbmwYUIsGf47OtQGSi23B/9gdJnm/5/Bwtcvaf+20MBw= 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" 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