From: "tarumizu.kohei@fujitsu.com" <tarumizu.kohei@fujitsu.com> To: 'Borislav Petkov' <bp@alien8.de> Cc: "catalin.marinas@arm.com" <catalin.marinas@arm.com>, "will@kernel.org" <will@kernel.org>, "tglx@linutronix.de" <tglx@linutronix.de>, "mingo@redhat.com" <mingo@redhat.com>, "dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>, "x86@kernel.org" <x86@kernel.org>, "hpa@zytor.com" <hpa@zytor.com>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org> Subject: RE: [RFC PATCH v2 0/5] Add hardware prefetch driver for A64FX and Intel processors Date: Thu, 18 Nov 2021 06:14:59 +0000 [thread overview] Message-ID: <OSBPR01MB20375F9AC9E544FC7239A0C1809B9@OSBPR01MB2037.jpnprd01.prod.outlook.com> (raw) In-Reply-To: <YYuD+jRPUQrsmAkD@zn.tnic> I'm sorry for the late reply. > So put all those justifications at the beginning of your 0th message > when you send a patchset so that it is clear to reviewers *why* you're > doing this. The "why" is the most important - everything else comes > after. I understand. The next time we send a patchset, put these justifications at the beginning of our 0th message. > Well, how many prefetcher drivers will be there? > > On x86 there will be one per vendor, so 2-3 the most… Currentry, we plan to support only two drivers for Intel and A64FX. Even if we support other vendors, it will probably increase only a little. >> We don't think this is a good way. If there is any other suitable >> way, we would like to change it. This means that our way is not good. Therefore, we would like to reconsider the file structure along with changes in the interface specification. > Also, as dhansen points out, we have already > > /sys/devices/system/cpu/cpu*/cache > > so all those knobs belong there on x86. Intel MSR and A64FX have hardware prefetcher that affect L1d cache and L2 cache. Does it suit your intention to create a prefetcher directory under the cache directory as below? /sys/devices/system/cpu/cpu*/cache/ index0/prefetcher/enable index2/prefetcher/enable The above example presumes that the L1d cache is at index0 (level: 1, type: Data) and the L2 cache is at index2 (level:2, type: Unified). > Also, I think that shoehorning all these different cache architectures > and different prefetcher knobs which are available from each CPU, into a > common sysfs hierarchy is going to cause a lot of ugly ifdeffery if not > done right. > > Some caches will have control A while others won't - they will have > control B so people will wonder why control A works on box B_a but not > on box B_b... > > So we have to be very careful what we expose to userspace because it > becomes an ABI which we have to support for an indefinite time. To avoid shoehorning different prefetchers in a common sysfs hierarchy, we would like to represent these to different hierarchy. Intel MSR has three type of prefetchers, and we represent "Hardware Prefethcer" as "hwpf", "Adjacent Cache Line Prefetcher" as "aclpf", and "IP Prefetcher" as "ippf". These prefetcher have one controllable parameter "disable". A64FX has one type of prefetcher, and we represent it as "hwpf". This prefetcher has three parameter "disable", "dist" and "strong". The following table shows which caches are affected by the combination of prefetcher and parameter. | Cache affected | Combination ([prefecher]/[parameter]) | |----------------|---------------------------------------| | Intel MSR L1d | hwpf/disable, ippf/disable | | Intel MSR L2 | hwpf/disable, aclpf/disable | | A64FX L1d | hwpf/disable, hwpf/dist, hwpf/strong | | A64FX L2 | hwpf/disable, hwpf/dist, hwpf/strong | Does it make sense to create sysfs directories as below? * For Intel MSR /.../index0/prefetcher/hwpf/enable /.../index0/prefetcher/ippf/enable /.../index2/prefetcher/hwpf/enable /.../index2/prefetcher/aclpf/enable * For A64FX /.../index[0,2]/prefetcher/hwpf/enable /.../index[0,2]/prefetcher/hwpf/dist /.../index[0,2]/prefetcher/hwpf/strong > Also, if you're going to give the xmrig example, then we should involve > the xmrig people and ask them whether the stuff you're exposing to > userspace is good for their use case. We would like to ask them when the interface specification is fixed to some extent. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: "tarumizu.kohei@fujitsu.com" <tarumizu.kohei@fujitsu.com> To: 'Borislav Petkov' <bp@alien8.de> Cc: "catalin.marinas@arm.com" <catalin.marinas@arm.com>, "will@kernel.org" <will@kernel.org>, "tglx@linutronix.de" <tglx@linutronix.de>, "mingo@redhat.com" <mingo@redhat.com>, "dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>, "x86@kernel.org" <x86@kernel.org>, "hpa@zytor.com" <hpa@zytor.com>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org> Subject: RE: [RFC PATCH v2 0/5] Add hardware prefetch driver for A64FX and Intel processors Date: Thu, 18 Nov 2021 06:14:59 +0000 [thread overview] Message-ID: <OSBPR01MB20375F9AC9E544FC7239A0C1809B9@OSBPR01MB2037.jpnprd01.prod.outlook.com> (raw) In-Reply-To: <YYuD+jRPUQrsmAkD@zn.tnic> I'm sorry for the late reply. > So put all those justifications at the beginning of your 0th message > when you send a patchset so that it is clear to reviewers *why* you're > doing this. The "why" is the most important - everything else comes > after. I understand. The next time we send a patchset, put these justifications at the beginning of our 0th message. > Well, how many prefetcher drivers will be there? > > On x86 there will be one per vendor, so 2-3 the most… Currentry, we plan to support only two drivers for Intel and A64FX. Even if we support other vendors, it will probably increase only a little. >> We don't think this is a good way. If there is any other suitable >> way, we would like to change it. This means that our way is not good. Therefore, we would like to reconsider the file structure along with changes in the interface specification. > Also, as dhansen points out, we have already > > /sys/devices/system/cpu/cpu*/cache > > so all those knobs belong there on x86. Intel MSR and A64FX have hardware prefetcher that affect L1d cache and L2 cache. Does it suit your intention to create a prefetcher directory under the cache directory as below? /sys/devices/system/cpu/cpu*/cache/ index0/prefetcher/enable index2/prefetcher/enable The above example presumes that the L1d cache is at index0 (level: 1, type: Data) and the L2 cache is at index2 (level:2, type: Unified). > Also, I think that shoehorning all these different cache architectures > and different prefetcher knobs which are available from each CPU, into a > common sysfs hierarchy is going to cause a lot of ugly ifdeffery if not > done right. > > Some caches will have control A while others won't - they will have > control B so people will wonder why control A works on box B_a but not > on box B_b... > > So we have to be very careful what we expose to userspace because it > becomes an ABI which we have to support for an indefinite time. To avoid shoehorning different prefetchers in a common sysfs hierarchy, we would like to represent these to different hierarchy. Intel MSR has three type of prefetchers, and we represent "Hardware Prefethcer" as "hwpf", "Adjacent Cache Line Prefetcher" as "aclpf", and "IP Prefetcher" as "ippf". These prefetcher have one controllable parameter "disable". A64FX has one type of prefetcher, and we represent it as "hwpf". This prefetcher has three parameter "disable", "dist" and "strong". The following table shows which caches are affected by the combination of prefetcher and parameter. | Cache affected | Combination ([prefecher]/[parameter]) | |----------------|---------------------------------------| | Intel MSR L1d | hwpf/disable, ippf/disable | | Intel MSR L2 | hwpf/disable, aclpf/disable | | A64FX L1d | hwpf/disable, hwpf/dist, hwpf/strong | | A64FX L2 | hwpf/disable, hwpf/dist, hwpf/strong | Does it make sense to create sysfs directories as below? * For Intel MSR /.../index0/prefetcher/hwpf/enable /.../index0/prefetcher/ippf/enable /.../index2/prefetcher/hwpf/enable /.../index2/prefetcher/aclpf/enable * For A64FX /.../index[0,2]/prefetcher/hwpf/enable /.../index[0,2]/prefetcher/hwpf/dist /.../index[0,2]/prefetcher/hwpf/strong > Also, if you're going to give the xmrig example, then we should involve > the xmrig people and ask them whether the stuff you're exposing to > userspace is good for their use case. We would like to ask them when the interface specification is fixed to some extent.
next prev parent reply other threads:[~2021-11-18 6:17 UTC|newest] Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-11-04 5:21 [RFC PATCH v2 0/5] Add hardware prefetch driver for A64FX and Intel processors Kohei Tarumizu 2021-11-04 5:21 ` Kohei Tarumizu 2021-11-04 5:21 ` [RFC PATCH v2 1/5] driver: hwpf: Add hardware prefetch core driver register/unregister functions Kohei Tarumizu 2021-11-04 5:21 ` Kohei Tarumizu 2021-11-04 5:21 ` [RFC PATCH v2 2/5] driver: hwpf: Add support for A64FX to hardware prefetch driver Kohei Tarumizu 2021-11-04 5:21 ` Kohei Tarumizu 2021-11-04 5:21 ` [RFC PATCH v2 3/5] driver: hwpf: Add support for Intel " Kohei Tarumizu 2021-11-04 5:21 ` Kohei Tarumizu 2021-11-08 1:51 ` Dave Hansen 2021-11-08 1:51 ` Dave Hansen 2021-11-09 9:44 ` tarumizu.kohei 2021-11-09 9:44 ` tarumizu.kohei 2021-11-04 5:21 ` [RFC PATCH v2 4/5] driver: hwpf: Add Kconfig/Makefile to build " Kohei Tarumizu 2021-11-04 5:21 ` Kohei Tarumizu 2021-11-04 5:21 ` [RFC PATCH v2 5/5] docs: ABI: Add sysfs documentation interface of " Kohei Tarumizu 2021-11-04 5:21 ` Kohei Tarumizu 2021-11-04 14:55 ` Dave Hansen 2021-11-04 14:55 ` Dave Hansen 2021-11-08 1:29 ` tarumizu.kohei 2021-11-08 1:29 ` tarumizu.kohei 2021-11-08 1:49 ` Dave Hansen 2021-11-08 1:49 ` Dave Hansen 2021-11-09 9:41 ` tarumizu.kohei 2021-11-09 9:41 ` tarumizu.kohei 2021-11-09 17:44 ` Dave Hansen 2021-11-09 17:44 ` Dave Hansen 2021-11-10 9:25 ` tarumizu.kohei 2021-11-10 9:25 ` tarumizu.kohei 2021-11-04 15:13 ` [RFC PATCH v2 0/5] Add hardware prefetch driver for A64FX and Intel processors Borislav Petkov 2021-11-04 15:13 ` Borislav Petkov 2021-11-08 2:17 ` tarumizu.kohei 2021-11-08 2:17 ` tarumizu.kohei 2021-11-10 8:34 ` Borislav Petkov 2021-11-10 8:34 ` Borislav Petkov 2021-11-18 6:14 ` tarumizu.kohei [this message] 2021-11-18 6:14 ` tarumizu.kohei 2021-11-18 7:09 ` tarumizu.kohei 2021-11-18 7:09 ` tarumizu.kohei 2021-12-06 9:30 ` tarumizu.kohei 2021-12-06 9:30 ` tarumizu.kohei 2021-11-04 17:10 ` Peter Zijlstra 2021-11-04 17:10 ` Peter Zijlstra 2021-11-08 2:36 ` tarumizu.kohei 2021-11-08 2:36 ` tarumizu.kohei
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=OSBPR01MB20375F9AC9E544FC7239A0C1809B9@OSBPR01MB2037.jpnprd01.prod.outlook.com \ --to=tarumizu.kohei@fujitsu.com \ --cc=bp@alien8.de \ --cc=catalin.marinas@arm.com \ --cc=dave.hansen@linux.intel.com \ --cc=hpa@zytor.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=mingo@redhat.com \ --cc=tglx@linutronix.de \ --cc=will@kernel.org \ --cc=x86@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.