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 D2A9AC433F5 for ; Tue, 25 Jan 2022 07:27:21 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/7CZID/Wv8yoI3k8WX8oNDeW7d8b3uvwDx2idTTPI+Y=; b=j1Xjs370MVms/o BJyEyrj6K36PO7jyYyOUaYLk5D07nh1/Y5p+ZqAm3CWbfRScrwGn4FwQ80e7/g8fLVWaOGMMRQHr2 QyKmdDydOpAi9yr3y6RvHl58K7CH6jELVYsZ1lRITjHiXc7OgCADt4/3NKV1iEB+I/a1xMP7WS3ov MMxn8xc2PX/rlbxMy1pyOg1XaaEQm/bsURTz4VEcRoHqM2R7iwy2X6QgplYmc4MB4QTufAFTF1lVn jJv8y08+2AWXbmeA0GP+XuX4dCgLq5cQL8DgQYoUHttKnnQpbDYRjapSO+97v9XSPuoN4PRE7piCl JswXsUhd0t19pmGaUtTw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCGCu-006iDU-5Q; Tue, 25 Jan 2022 07:25:38 +0000 Received: from esa2.hc1455-7.c3s2.iphmx.com ([207.54.90.48]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nCG2P-006eXl-Ap for linux-arm-kernel@lists.infradead.org; Tue, 25 Jan 2022 07:14:47 +0000 IronPort-SDR: l9hE3msAVkXGqwfVqLppjm8axyC/sy3Ql4hAn4tZ2ZGQfi71+Z3sOlOqAd0ZB2U50pGS+erUMN aphs0BJOaCnwH2KV6KD+mAmECkalS543FiiCBYO71YpGQGPaYZyNZx8p9h+eboaCw2LcWkRqWJ gnCUyTZDWEgG5qhehEVh0FkjUReVXZuFkdFKUnwgMi4S9pkxFSrNffrJ2/KXuL+H5ZUMrFkan/ F9VcdpeISwOm16rTwb63mUfSOXXT8TEY/Fib4FYk7ZdDclXMfiWL7kaDOHpJbnjHTxiuIGYebi KrJVTPsJoolz+snoEhrS+bT8 X-IronPort-AV: E=McAfee;i="6200,9189,10237"; a="60366215" X-IronPort-AV: E=Sophos;i="5.88,314,1635174000"; d="scan'208";a="60366215" Received: from unknown (HELO oym-r1.gw.nic.fujitsu.com) ([210.162.30.89]) by esa2.hc1455-7.c3s2.iphmx.com with ESMTP; 25 Jan 2022 16:14:43 +0900 Received: from oym-m4.gw.nic.fujitsu.com (oym-nat-oym-m4.gw.nic.fujitsu.com [192.168.87.61]) by oym-r1.gw.nic.fujitsu.com (Postfix) with ESMTP id 13F09E8FFC for ; Tue, 25 Jan 2022 16:14:42 +0900 (JST) Received: from yto-om4.fujitsu.com (yto-om4.o.css.fujitsu.com [10.128.89.165]) by oym-m4.gw.nic.fujitsu.com (Postfix) with ESMTP id 3798CD686A for ; Tue, 25 Jan 2022 16:14:41 +0900 (JST) Received: from localhost.localdomain (n3235113.np.ts.nmh.cs.fujitsu.co.jp [10.123.235.113]) by yto-om4.fujitsu.com (Postfix) with ESMTP id E2062400C1BBE; Tue, 25 Jan 2022 16:14:40 +0900 (JST) From: Kohei Tarumizu To: 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, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: tarumizu.kohei@fujitsu.com Subject: [PATCH 8/8] docs: ABI: Add sysfs documentation interface of hardware prefetch control driver Date: Tue, 25 Jan 2022 16:14:14 +0900 Message-Id: <20220125071414.811344-9-tarumizu.kohei@fujitsu.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220125071414.811344-1-tarumizu.kohei@fujitsu.com> References: <20220125071414.811344-1-tarumizu.kohei@fujitsu.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220124_231445_677161_88A724DB X-CRM114-Status: GOOD ( 14.92 ) 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 This describes the sysfs interface implemented on the hardware prefetch control driver. Signed-off-by: Kohei Tarumizu --- .../ABI/testing/sysfs-devices-system-cpu | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu index 61f5676a7429..66b4023b2ed1 100644 --- a/Documentation/ABI/testing/sysfs-devices-system-cpu +++ b/Documentation/ABI/testing/sysfs-devices-system-cpu @@ -681,3 +681,96 @@ Description: (RO) the list of CPUs that are isolated and don't participate in load balancing. These CPUs are set by boot parameter "isolcpus=". + +What: /sys/devices/system/cpu/cpu*/cache/index[0,2]/prefetch_control +Date: January 2022 +Contact: Linux kernel mailing list +Description: Parameters for CPU's hardware prefetch control + + This sysfs interface provides Hardware Prefetch control + attribute file by using implementation defined registers. + This file exists in every CPU's cache/index[0,2] directory. + Each attribute file corresponds to the cache level of the + parent index directory. + + prefetch_control: (RW) This file allows user to control + several options described below. Which options are available + depends on the CPU. + + * hardware_prefetcher_enable: + The enablement status of prefetcher, "enable" or "disable". + + * ip_prefetcher_enable: + The enablement status of prefetcher, "enable" or "disable". + + * adjacent_cache_line_prefetcher_enable: + The enablement status of prefetcher, "enable" or "disable". + + * stream_detect_prefetcher_enable: + The enablement status of prefetcher, "enable" or "disable". + + * stream_detect_prefetcher_strong: + The strongness status of prefetcher, "strong" or "weak". + + * stream_detect_prefetcher_dist: + The current prefetcher distance value in bytes or the "auto". + This value is a multiples of a specific value, depending on + the CPU. + + Write either a value in byte or the string "auto" to this + parameter. If you write a value less than multiples of a + specific value, it is rounded up. + + - Supported processors + + This sysfs interface is available on several processors, x86 + and ARM64. Currently, the following processors are supported: + + - x86 processor + - INTEL_FAM6_BROADWELL_X + + - ARM64 processor + - FUJITSU_CPU_PART_A64FX + + - Attribute mapping + + Some Intel processors have MSR 0x1a4. This register has several + specifications depending on the model. This interface provides + a one-to-one option to control all the tunable parameters the + CPU provides of the following. + + - "* Hardware Prefetcher Disable (R/W)" + corresponds to the attribute "hardware_prefetcher_enable" + + - "* Adjacent Cache Line Prefetcher Disable (R/W)" + corresponds to the attribute "adjacent_cache_line_prefetcher_enable" + + - "* IP Prefetcher Disable (R/W)" + corresponds to the attribute "ip_prefetcher_enable" + + The processor A64FX has register IMP_PF_STREAM_DETECT_CTRL_EL0 + for Hardware Prefetch Control. This attribute maps each + specification to the following. + + - "L*PF_DIS": enablement of hardware prefetcher + corresponds to the attribute "stream_detect_prefetcher_enable" + + - "L*W": strongness of hardware prefetcher + corresponds to the attribute "stream_detect_prefetcher_strong" + + - "L*_DIST": distance of hardware prefetcher + corresponds to the attribute "stream_detect_prefetcher_dist" + + - Example:: + + # cat /sys/devices/system/cpu/cpu0/cache/index0/prefetch_control + + > hardware_prefetcher_enable=enable + > ip_prefetcher_enable=enable + + # echo "hardware_prefetcher_enable=disable" > /sys/devices/system/cpu/cpu0/cache/index0/prefetch_control + + # cat /sys/devices/system/cpu/cpu0/cache/index2/prefetch_control + + > hardware_prefetcher_enable=disable + > ip_prefetcher_enable=enable -- 2.27.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel