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 X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2CC64C43381 for ; Wed, 20 Feb 2019 22:44:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 050342086C for ; Wed, 20 Feb 2019 22:44:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726358AbfBTWoV (ORCPT ); Wed, 20 Feb 2019 17:44:21 -0500 Received: from mga03.intel.com ([134.134.136.65]:17956 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725847AbfBTWoV (ORCPT ); Wed, 20 Feb 2019 17:44:21 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Feb 2019 14:44:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,392,1544515200"; d="scan'208";a="145942736" Received: from unknown (HELO localhost.localdomain) ([10.232.112.69]) by fmsmga004.fm.intel.com with ESMTP; 20 Feb 2019 14:44:20 -0800 Date: Wed, 20 Feb 2019 15:44:19 -0700 From: Keith Busch 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 Subject: Re: [PATCHv6 07/10] acpi/hmat: Register processor domain to its memory 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 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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.