Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp55425imu; Tue, 27 Nov 2018 08:58:45 -0800 (PST) X-Google-Smtp-Source: AFSGD/U24TZqttr/KiNV6Kr+HuJXb4IUs9SM/sThmie8RC1F5CVAL+RoRHs8aN6B24kWHulSl4B+ X-Received: by 2002:a17:902:6bc4:: with SMTP id m4mr17557040plt.93.1543337925027; Tue, 27 Nov 2018 08:58:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543337924; cv=none; d=google.com; s=arc-20160816; b=YZge6acB2cxVg9rCKKI4sVXhKpNDoKmb1q07F/vYSSDu9CSXeI9McrTmeRxj6tUeHP CHW1HZoue8gGbHy3ZNTeiBmwzB6o4KQ3pFR7RbXkZpe2RKabxMZv8uD5FU6zvy6AG3Uk YTqAfDwT4KiyDushhArE5bd29uO8SdKOwHut/gPmPwCWlkUU3sba5oJKxPOKlzIepdo5 IxmDm10ynQAx5YfmO03eaTpTrWLq5bxIJbnGJoxd03w/PPhqOK82uFkT3v+TuS9uDJSS pTGb/s2pAq5C2v/nxgCN4tMmrH0nPniBzC2CgHCO/IIqNKfbzeFF5n3mE5c1vb3wQtfJ cjlg== 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:dkim-signature; bh=+TUKvNyWHtP7n3h7wLLhST1c5AhhjeLrIUlsLCYZqe8=; b=uqsoNNXiVYmsueLEsDMBwDLDpGxqMK6xd/4MPgbWkUykNI0EhLIUjDQQirBiPDKmvy aFFXZJ74TLsR20DG24pwv1aF0L7F1R8xSuYQXe6Wt9XziPP/kMDXmN9WQXVNZ5a6eqy6 6QQrI3jmw+6m8ENG1zta+yh8FwaFbN8aD0yTmpaWA7d2rV7lwKEfMWJIcHVQjfOInR6K coc+vq6wOY3dOSVdqAoIk9G6O4wIlEoSHEyW9Q4tqaQ8GNrFw9XutPaHfJrUXAUrAktr Z5bjC0svtN+0jougYG3QhBrZVcqIHJIyMvwBBXeHJXqvISYgHVSME3ewx6nCGAYlDngh AHOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=iNugaPRR; 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g1si4199361pgj.34.2018.11.27.08.58.28; Tue, 27 Nov 2018 08:58:44 -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; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=iNugaPRR; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731903AbeK1Dzs (ORCPT + 99 others); Tue, 27 Nov 2018 22:55:48 -0500 Received: from mail-oi1-f196.google.com ([209.85.167.196]:33463 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731768AbeK1Dyx (ORCPT ); Tue, 27 Nov 2018 22:54:53 -0500 Received: by mail-oi1-f196.google.com with SMTP id c206so19939778oib.0 for ; Tue, 27 Nov 2018 08:56:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+TUKvNyWHtP7n3h7wLLhST1c5AhhjeLrIUlsLCYZqe8=; b=iNugaPRR31iHt+uG/Z+fg3BS3fX3BqNOPO43l0UN3QbmyzZMv4DG36GDgycK6JGnXw 6iW/SWuZxfuZDq3n2+IvTNKyAePrakGXcepVLH5DVufkI8tInT4pfVCfi7JHu8x+sHrl ejyvpjC9WvmqPbTvCmSm8LlOreeoP99dcObRetlsWQwiG5v3K+PXo3D/nZz3Ch1M3uW1 J+YjcLhQ+ut16nifn7GP7unzUmIATqK8SXMhvpGCbYLiScA/zHZOafr3mVdAr+lVCRZj rby+Q7SncGyGSBwD+twKoqrDrvvZPdDnCG7S4ZfWK2Ft5assAm7nPVUOjiE720txehd9 LHOg== 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=+TUKvNyWHtP7n3h7wLLhST1c5AhhjeLrIUlsLCYZqe8=; b=t90PZ0BhAe+sbpTfbD5t98X3m8tIWnB0xqlULjtHOHg8tneOfIUbnBcOD4xjGEFJkD icg5AP8JK4Ac/2ZCnt1zjD4V4z4cWdGaZB2JYr+g1Vikj71mNMlRlVpGzaiYWyaAqen8 CHunkaQrtpXOhI7M+STEaxLyWs5r/cDQIWVXRIppLRplKfAWWxRmsxBIgs3nzqG7emLc kYUEXCFukTSUEXp8QjrTcz7YVUU2DH4qVAKzJDlHIqniOSEzvHHXbPc/FqQVMuDMBR3J 4Mvr4mynKD0Djnsmq3KVaoVvtTFLUPfI9C5Bh67owamh0zDWaF8ISHpBCiY1pbEVB6BM qJfg== X-Gm-Message-State: AGRZ1gLaGCAJxXiuq/HvteU/lxqtzJpYhMvDuL1M4sxf+K3B3XapdjFW tpU7DXzmQgHzmr3BjaQdhn+V+HrZsMZgNyDTazRaFA== X-Received: by 2002:aca:d944:: with SMTP id q65-v6mr19304787oig.0.1543337781677; Tue, 27 Nov 2018 08:56:21 -0800 (PST) MIME-Version: 1.0 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> <325d0e69-053a-ae9c-eede-7cdf28b1dbd6@arm.com> In-Reply-To: <325d0e69-053a-ae9c-eede-7cdf28b1dbd6@arm.com> From: Dan Williams Date: Tue, 27 Nov 2018 08:56:09 -0800 Message-ID: Subject: Re: [PATCH 0/7] ACPI HMAT memory sysfs representation To: anshuman.khandual@arm.com Cc: Dave Hansen , Keith Busch , Linux Kernel Mailing List , Linux ACPI , Linux MM , Greg KH , "Rafael J. Wysocki" 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 Tue, Nov 27, 2018 at 2:15 AM Anshuman Khandual wrote: > > > > 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. Yes, I can get on board with sysfs providing a subset of the performance description for administrators to discover the common case via scripting and leave the exhaustive attribute description to a separate interface. I was pushing back on the notion that sysfs must be that exhaustive interface... we're making progress. I still think we need /sys/devices/system/node/nodeX/platform_id to enable higher order platform enumeration tooling, but that need not be the end of the kernel interface description.