Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1396411iob; Thu, 19 May 2022 05:56:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4HnR4QejfyTWfKeK7RJWYnU2DSy3QPiXgrsSTKqlBBEf66xYUH8GFgkEfr2/ZeVhM1VlG X-Received: by 2002:a17:907:9487:b0:6f8:747a:845e with SMTP id dm7-20020a170907948700b006f8747a845emr4265661ejc.299.1652964978946; Thu, 19 May 2022 05:56:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652964978; cv=none; d=google.com; s=arc-20160816; b=bQgw8in01+0mWHXkieCmKUwb37KYzKf0M9Pd9dS4BrjCW4cCXWmXaiIh2YNs4eYTL+ px2HAWmAaoC2UhTsDhQ7Rcbd0W3eUfhUKYCBd3NkM8O7I3EeM+gEMlg3NT4Hf0aicxea b7LjgqvjZqG1T+TbQW45oFzagHYx5+Tkv9bLPKwXvNx2ANdi4QsUCT1NdsZ0XdaWr4Ih UB+okrDEtd12+JD3g4iN69gBICzWZU28Txh525pxY0NnyVSg+QKuKuGn1U/+yTyCTo/p zktZkSj7cjPAVUb5W9Xipf7YYGmUhqr44/FHbtLnW7tgWM6OoyUnhadzXQJ1Mx3R1A8h ES4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=TZcZV7DOkjTXJPZvhGE7a4QnQ+HrPSCFH2T+O1IKcm0=; b=db+lCSRKPHcyU18At37dnph1IydyL72P5kWfikEVHd4m1ama5GVWHUPEv46YLDkTks TgX/WbASnB2WPrxekgNfHZNllaqh89iVKU60Dtzzwf7FmUEkBh9+SCvGuGwCKKK7R6xQ L68sDvnXmJZcj56xmMGVAs//5Yq+ADgRJpE5aeS6e+kJ6Fl1kgabryHenIfTVYyfC/T+ m/trq1aggBbLMXsSXObqp1YRW4BLv8zpyMjF7e+KmXg1VzJ5NRYmvApGSinNV8zDdF/L GVQc2qdTwtc1z4REwhFRq742WOy3Bn949bTo+WzVXMTtxWPUHdwIwza0l+JI3ByGGJI/ IGgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marcan.st header.s=default header.b=ojaiMLek; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=marcan.st Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g22-20020a17090670d600b006f3891ead87si5844197ejk.802.2022.05.19.05.55.49; Thu, 19 May 2022 05:56: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=@marcan.st header.s=default header.b=ojaiMLek; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=marcan.st Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235371AbiESI3x (ORCPT + 99 others); Thu, 19 May 2022 04:29:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232142AbiESI3w (ORCPT ); Thu, 19 May 2022 04:29:52 -0400 Received: from mail.marcansoft.com (marcansoft.com [IPv6:2a01:298:fe:f::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE41B7981A for ; Thu, 19 May 2022 01:29:50 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: marcan@marcan.st) by mail.marcansoft.com (Postfix) with ESMTPSA id 9710C419BC; Thu, 19 May 2022 08:29:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=marcan.st; s=default; t=1652948988; bh=5kyzTvASw3UKGusahQelKEPBKdXW7kdc8VKMIbe/oIQ=; h=Date:Subject:To:References:From:In-Reply-To; b=ojaiMLekIVlHOaF77Y5cGLw1S8Zx87mKedlKGJR4lKcJGtd2Gt/jm3zxxRfTJCRPc AuGKoRGspVv4G6rAcHktsBWHBlu8NrzGxugEKMA9lXrFhLgpFtYqLxvqz0Pw6FNBN4 z82mxtTnRLJbfHDlOPiLIQPhMg96g2x817T1pMDxUfF/Sd13iUVetvxbpj6OpXaybT OcDXNNj0sArUiXh4qPFx+86ftmYBtPs8/iknm/Xxhk/Zin7xSJgQns6G82HLQqB7nd mOlYw7L2ElCF3La1V3XCXee9iP3LgHtqXh0LCikXhFrI8Ktu04Lk06xmoUQxhEM0G1 oS9tOR/N7Lj2A== Message-ID: <57184edb-8a04-b4bd-969b-bca152375d86@marcan.st> Date: Thu, 19 May 2022 17:29:39 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH v4 0/8] Add hardware prefetch control driver for A64FX and x86 Content-Language: es-ES To: Kohei Tarumizu , 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, gregkh@linuxfoundation.org, rafael@kernel.org, mchehab+huawei@kernel.org, eugenis@google.com, tony.luck@intel.com, pcc@google.com, peterz@infradead.org, marcos@orca.pet, conor.dooley@microchip.com, nicolas.ferre@microchip.com, linus.walleij@linaro.org, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20220518063032.2377351-1-tarumizu.kohei@fujitsu.com> From: Hector Martin In-Reply-To: <20220518063032.2377351-1-tarumizu.kohei@fujitsu.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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 18/05/2022 15.30, Kohei Tarumizu wrote: > This patch series add sysfs interface to control CPU's hardware > prefetch behavior for performance tuning from userspace for the > processor A64FX and x86 (on supported CPU). > [snip] > In pattern A, a change of dist at L1 has a larger effect. On the other > hand, in pattern B, the change of dist at L2 has a larger effect. > As described above, the optimal dist combination depends on the > characteristics of the application. Therefore, such a sysfs interface > is useful for performance tuning. If this is something to be tuned for specific applications, shouldn't it be a prctl or similar and part of process context, so different applications can use different settings (or even a single application depending on what it's doing)? Especially if writing those sysregs/MSRs is cheap. In particular, configuring things separately for different cores feels strange. You'd then have to pin applications to specific cores to get the benefits, and wouldn't be able to optimize for multiple applications running simultaneously that need different prefetch behavior if they share cores. -- Hector Martin (marcan@marcan.st) Public Key: https://mrcn.st/pub