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 BA50EC433EF for ; Thu, 19 May 2022 08:30:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235376AbiESI3x (ORCPT ); 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 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 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CB265C433EF for ; Thu, 19 May 2022 08:31:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8ZhS/AlypIxPDO60SoxxVobWaJtROMWOqWY3GTeExSE=; b=Wb/DhMzN91Ox9H gJwNTGgoE6M2zlWz0mLq005hOeVjUWh59u06Lv4kFR7VZmBnBuAUHgPp3vDqCnuKPLAZAW1f2xMNH 43f5xlNpquV3FrDJM5PnJfIslJfeYVTClsHFQChF60nbCGavvpNMO2FlKv5h1IBT5uCk04rLzuJfm iXTm/mDYYXClE7vAU1LVCJtjh9nX87E9LsNUGYykCKb2R7V7UyBuXKm/HmypU29olyKIF6Z2iNOpK 6HfSjkq7hG/mrV0m7MggCE64u7uPxj/zVRGy+CjpreRqVVTZjgBEABON++uXhom1zcd6zRwR+8YnU fu5alPIA436MSqHdSFTA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nrbXo-005rCq-SG; Thu, 19 May 2022 08:30:05 +0000 Received: from marcansoft.com ([2a01:298:fe:f::2] helo=mail.marcansoft.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nrbXe-005r6O-QV for linux-arm-kernel@lists.infradead.org; Thu, 19 May 2022 08:29:57 +0000 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220519_012955_873276_3DEE2BE6 X-CRM114-Status: GOOD ( 12.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel