From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keith Busch Subject: Re: [PATCHv6 07/10] acpi/hmat: Register processor domain to its memory Date: Wed, 20 Feb 2019 15:44:19 -0700 Message-ID: <20190220224419.GC5478@localhost.localdomain> References: <20190214171017.9362-1-keith.busch@intel.com> <20190214171017.9362-8-keith.busch@intel.com> <9ab5d6ba-4cb6-a6f1-894d-d79b77c8bc21@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: "Rafael J. Wysocki" Cc: Dave Hansen , Linux Kernel Mailing List , ACPI Devel Maling List , Linux Memory Management List , Linux API , Greg Kroah-Hartman , Dan Williams List-Id: linux-api@vger.kernel.org On Wed, Feb 20, 2019 at 11:21:45PM +0100, Rafael J. Wysocki wrote: > On Wed, Feb 20, 2019 at 11:11 PM Dave Hansen wrote: > > On 2/20/19 2:02 PM, Rafael J. Wysocki wrote: > > >> diff --git a/drivers/acpi/hmat/Kconfig b/drivers/acpi/hmat/Kconfig > > >> index c9637e2e7514..08e972ead159 100644 > > >> --- a/drivers/acpi/hmat/Kconfig > > >> +++ b/drivers/acpi/hmat/Kconfig > > >> @@ -2,6 +2,7 @@ > > >> config ACPI_HMAT > > >> bool "ACPI Heterogeneous Memory Attribute Table Support" > > >> depends on ACPI_NUMA > > >> + select HMEM_REPORTING > > > If you want to do this here, I'm not sure that defining HMEM_REPORTING > > > as a user-selectable option is a good idea. In particular, I don't > > > really think that setting ACPI_HMAT without it makes a lot of sense. > > > Apart from this, the patch looks reasonable to me. > > > > I guess the question is whether we would want to allow folks to consume > > the HMAT inside the kernel while not reporting it out via > > HMEM_REPORTING. We have some in-kernel users of the HMAT lined up like > > mitigations for memory-side caches. > > > > It's certainly possible that folks would want to consume those > > mitigations without anything in sysfs. They might not even want or need > > NUMA support itself, for instance. > > > > So, what should we do? > > > > config HMEM_REPORTING > > bool # no user-visible prompt > > default y if ACPI_HMAT > > > > So folks can override in their .config, but they don't see a prompt? > > Maybe it would be better to make HMEM_REPORTING do "select ACPI_HMAT if ACPI". > > The mitigations could then do that too if they depend on HMAT and > ACPI_HMAT need not be user-visible at all. That sounds okay, though it would create unreachable code if !ACPI since that's the only user for the new reporting interfaces.