Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp524242imu; Tue, 27 Nov 2018 02:16:35 -0800 (PST) X-Google-Smtp-Source: AFSGD/WiJr5qgS5jtub40G++UyS61wuI7qFE+9GaclO5K3HGnWbeXy9pw/Kh6yBQpmnanf3t22sp X-Received: by 2002:a63:db02:: with SMTP id e2mr28951980pgg.419.1543313795789; Tue, 27 Nov 2018 02:16:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543313795; cv=none; d=google.com; s=arc-20160816; b=Mab8HVJU4JUaK9RkivUDRXhwVHJkI4RLnnwcYyd5PBMe/dqSoCBx0qnAjb/vHOMepN zzzryu5jH9c2NzoLdanxO49poAg485Z2jjDOBvM/4S/8ZdyCPMKIAWKGZCp2jswi4Vvk +waQ+zbShafBsCdZPkXFReRI8Y85uAR4MNs2DaNEYyFK/2aMdP3hJOPuhQ/oRiDH6jrE yONG1FnXZlc1z/qaGoaFPkvednSsktNok0Rgf7e+U71VL6fW62xLMsT5olGT3BFQtIc2 JQw8MxwoMytmOf5dtnHkIEW52RPsXx1u0hNzVnry2Ooip7fZQAmvzDOw3DOer0RGArff rO7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=IVVKboxW5F3UP9ZZCP9XhBkzcL+cmADrQZ0AlY9AqAQ=; b=i6GAJuEGTDabAEjJ5IevYLV3UcqktQ002knHo9K3HrKo5+D97XRsbv2ODfKRKM1Osx D+J6ltOQ511ooZjlSzsbQbVrMMLqgzgSsQcyere0oqYovtYlw8sLL914CPp0Zj8wVv+9 Ag5rdLOcTpF8Z25+hE5A6ExScrxYg5KscrwwHvsAgTXfr3J5AtyQh9KUtOlAIfLyoIrN IiZ+NTMp8boA1SCpphr1MZH+aEtPsCI4nL8Qrp0nDiQg8jItQkmb433o1bCuXyAd/kdC YaysXYJSlBbiEJj5tqaxe5TDT7/qIUGHCe9nv9ne8we72GjKDyZuuE93PGcT9GiUKCy0 NIUw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i96si816855plb.188.2018.11.27.02.16.19; Tue, 27 Nov 2018 02:16:35 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730466AbeK0VNE (ORCPT + 99 others); Tue, 27 Nov 2018 16:13:04 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:60680 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726405AbeK0VNE (ORCPT ); Tue, 27 Nov 2018 16:13:04 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6235C3563; Tue, 27 Nov 2018 02:15:39 -0800 (PST) Received: from [10.1.196.73] (unknown [10.1.196.73]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 07C833F575; Tue, 27 Nov 2018 02:15:37 -0800 (PST) Subject: Re: [PATCH 0/7] ACPI HMAT memory sysfs representation To: Dan Williams , Dave Hansen Cc: Keith Busch , Linux Kernel Mailing List , Linux ACPI , Linux MM , Greg KH , "Rafael J. Wysocki" References: <20181114224902.12082-1-keith.busch@intel.com> <1ed406b2-b85f-8e02-1df0-7c39aa21eca9@arm.com> <4ea6e80f-80ba-6992-8aa0-5c2d88996af7@intel.com> <9015e51a-3584-7bb2-cc5e-25b0ec8e5494@intel.com> From: Anshuman Khandual Message-ID: <325d0e69-053a-ae9c-eede-7cdf28b1dbd6@arm.com> Date: Tue, 27 Nov 2018 15:45:40 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/26/2018 11:38 PM, Dan Williams wrote: > On Mon, Nov 26, 2018 at 8:42 AM Dave Hansen wrote: >> >> On 11/23/18 1:13 PM, Dan Williams wrote: >>>> A new system call makes total sense to me. I have the same concern >>>> about the completeness of what's exposed in sysfs, I just don't see a >>>> _route_ to completeness with sysfs itself. Thus, the minimalist >>>> approach as a first step. >>> Outside of platform-firmware-id to Linux-numa-node-id what other >>> userspace API infrastructure does the kernel need to provide? It seems >>> userspace enumeration of memory attributes is fully enabled once the >>> firmware-to-Linux identification is established. >> >> It would be nice not to have each app need to know about each specific >> platform's firmware. > > The app wouldn't need to know if it uses a common library. Whether the > library calls into the kernel or not is an implementation detail. If > it is information that only the app cares about and the kernel does > not consume, why have a syscall? If we just care about platform-firmware-id <--> Linux-numa-node-id mapping and fetching memory attribute from the platform (and hiding implementation details in a library) then the following interface should be sufficient. /sys/devices/system/node/nodeX/platform_id But as the series proposes (and rightly so) kernel needs to start providing ABI interfaces for memory attributes instead of hiding them in libraries.