Received: by 2002:ac0:b08d:0:0:0:0:0 with SMTP id l13csp3744179imc; Sun, 24 Feb 2019 12:00:41 -0800 (PST) X-Google-Smtp-Source: AHgI3Ib3MbQ1mKTcjLpztb3HJktJffekE0tK+Z5HBYASDstZdQnXtz7jvFrhj8Ao29eX4FjbfFwU X-Received: by 2002:a17:902:8ec1:: with SMTP id x1mr16280569plo.52.1551038441579; Sun, 24 Feb 2019 12:00:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551038441; cv=none; d=google.com; s=arc-20160816; b=YwRyBZ41HcAvvPULskALkx8qpdHu+vqJiouIysoZLTlLU7XCr5Tgh7l7jTik/6L1aA sqmSw23gpEeRTQi5tJwJ4s2UCC58rbatkDIKYEOKIaf0uQBQXaIpAAhLi5awsMTfKPkI qAxwgdgACIgAyIjG5ytwshZgzkOtMdfsNRL6PYX3ScFjBq5CAOuE3mkXrX02eM0CfeBu 6ZpOm9PWY5YDvbY3y+D9TKnKlmTjevsU+DE63h4gVREChhnCGHNVeifFEi98/37bgalx Pygoor6jSGxslOO9re1/qdfb9+jSayiPBVxwjm1bFmLZYY/Mkffh49KFfkL5ETmqVkmA jQNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=yfmUSwBalOdjcvnqS+eLnkmWA+LNz1+spq3jB7NTkvA=; b=Cc7d+OVIur4ZtYZWTwYrLys+a/Wm+Dv+xN2LIqk6j7k8Q5mtCUoi/zppjl2xcpNlst 39YeQOjxSsxACZklIBJg33QQExFUyBGs4BO6N1RhVl4Bj6E6Ug4eidMtFK+vljlZSAM6 ATh3ULF2DBkg4R/3DfRGOH9CzjgWSWgB6XTEKDpYHpDtul+fuxh6cBIgCoIEWfvI+0BG vNM0vxuGCqEDJQBlh5ZuM59O8G1ckqDh19c7bqeWGDJJnkI0NCE5xUOvTGGRYis4NGkX tYg10flidRZyOWE01O4bFMlxVP2H3D2Qt04zpkI4EaZh8t04M7of74L730TRmqRBRC0W ff8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 37si4030346pgu.58.2019.02.24.12.00.23; Sun, 24 Feb 2019 12:00:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728210AbfBXUAD (ORCPT + 99 others); Sun, 24 Feb 2019 15:00:03 -0500 Received: from mail-oi1-f193.google.com ([209.85.167.193]:37108 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727272AbfBXUAB (ORCPT ); Sun, 24 Feb 2019 15:00:01 -0500 Received: by mail-oi1-f193.google.com with SMTP id w66so5653350oia.4; Sun, 24 Feb 2019 12:00:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yfmUSwBalOdjcvnqS+eLnkmWA+LNz1+spq3jB7NTkvA=; b=HABPl9MPFMlFo59VQrJ6Ko0UP4/ozXlb6y2auWNx1GOF3qL521Z7q8z7goowO6Kb0o N5UzrvQBS+e3tbcBLj62YbrIqT1GD67iLou0cnXXDFf4bVYcMo4v9wvUlgloTZr/JwKf QrmNqOHcL7WzmY7MuN7ufXqJxVF2GsLaECN7E1vPC1mBTw9/Rq6BOzfuGF8dRrpK5n0U RPCL978L8CC12a0Oyq4ru/oXtWLzigRi+yX4F6GoYqVz0tiFL+KhRhfK94roYrOdfhWA LjD1Mz1AVuKNwXCk5JL1K1HvNbRx1V83AVCUALdAWGF+12YXqH72x1PJk45IoXJVT1nu Dmeg== X-Gm-Message-State: AHQUAuaidOvX5o6RWcKbuJPz1jxFXjOpDWGizxyqCTbYS37L8GfGGkMg Lc3jPAyYElR+6HCDptdnW8UdgJlDPZg3LqIz13U= X-Received: by 2002:aca:c141:: with SMTP id r62mr8543843oif.160.1551038400097; Sun, 24 Feb 2019 12:00:00 -0800 (PST) MIME-Version: 1.0 References: <20190214171017.9362-1-keith.busch@intel.com> <20190214171017.9362-8-keith.busch@intel.com> <20190222184831.GF10237@localhost.localdomain> In-Reply-To: <20190222184831.GF10237@localhost.localdomain> From: "Rafael J. Wysocki" Date: Sun, 24 Feb 2019 20:59:45 +0100 Message-ID: Subject: Re: [PATCHv6 07/10] acpi/hmat: Register processor domain to its memory To: Keith Busch Cc: "Rafael J. Wysocki" , Linux Kernel Mailing List , ACPI Devel Maling List , Linux Memory Management List , Linux API , Greg Kroah-Hartman , Dave Hansen , Dan Williams Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 22, 2019 at 7:48 PM Keith Busch wrote: > > On Wed, Feb 20, 2019 at 11:02:01PM +0100, Rafael J. Wysocki wrote: > > On Thu, Feb 14, 2019 at 6:10 PM Keith Busch wrote: > > > 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'm trying to implement based on the feedback, but I'm a little confused. > > As I have it at the moment, HMEM_REPORTING is not user-prompted, so > another option needs to turn it on. I have ACPI_HMAT do that here. > > So when you say it's a bad idea to make HMEM_REPORTING user selectable, > isn't it already not user selectable? I thought that HMEM_REPORTING was user-prompted initially, by bad if it wasn't. > If I do it the other way around, that's going to make HMEM_REPORTING > complicated if a non-ACPI implementation wants to report HMEM > properties. But the mitigations that Dave was talking about get in the way, don't they? Say there is another Kconfig option,CACHE_MITIGATIONS, to enable them. Then you want ACPI_HMAT to be set when that it set and you also want ACPI_HMAT to be set when HMEM_REPORTING and ACPI_NUMA are both set. OTOH, you may not want HMEM_REPORTING to be set when CACHE_MITIGATIONS is set, but that causes ACPI_HMAT to be set and which means that ACPI_HMAT alone will not be sufficient to determine the HMEM_REPORTING value. Now, if you prompt for HMEM_REPORTING and make it depend on ACPI_NUMA, then ACPI_HMAT can be selected by that (regardless of the CACHE_MITIGATIONS value). And if someone wants to use HMEM_REPORTING without ACPI_NUMA, it can be made depend on whatever new option is there for that non-ACPI mechanism. There might be a problem if someone wanted to enable the alternative way of HMEM_REPORTING if ACPI_NUMA was set (in which case HMAT would have to be ignored even if it was present), but in that case there would need to be an explicit way to choose between HMAT and non-HMAT anyway. In any case, I prefer providers to be selected by consumers and not the other way around, in case there are multiple consumers for one provider.