Received: by 2002:ac0:8c8e:0:0:0:0:0 with SMTP id r14csp1203480ima; Wed, 6 Feb 2019 15:48:52 -0800 (PST) X-Google-Smtp-Source: AHgI3IZwrqJQimv6c89wDAwO0Wnine936ERgzIYr7uR4sZz+SK/eCzS+N8eMom8EgD4zjlzj6CYn X-Received: by 2002:a63:40c6:: with SMTP id n189mr11821140pga.355.1549496932773; Wed, 06 Feb 2019 15:48:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549496932; cv=none; d=google.com; s=arc-20160816; b=FAWRrKq/KYYxp+2Uf4QU6CI/g1VJTBnRr+2oUuAYGOWj1CIU0/5VCIEbczsgMu+MIo 8MnaF/5I+yx5F4QVZBiIqO3tpfk5ictZKEcVOWnH+asK5NoZIS3plMIhitPWNGPNXBcO 931t54v7//5E/ChZ11slLvtDoO7050tQZJEihfSTACPEiFXX+G6pLeXurbl/Cm4yLJVc m18S1LkvIkEq+FdX8N7QfpotBWDvli/171nEWZcV4MdzF6YCc5NqsnrtDrtkZlIhjLXs L1K4LM9LGv/ES1214fMszgEOXp4FkLQAqYuiCowxFgDV7qBjLygl4SZHzBzdITb8f2Lj YWcA== 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=2km3dMyZpRUU5hnOZjk3ra+UsEl0QjP4uRCEE8dLVpA=; b=AeQqZM19Fx6kqeaIeWMf02VXpKqTMl6EPZHn89/B0AavOSq8mKdk/KlzN9Uft3L6kX 6yFnAyaETvjT6XyqtRljdGN5o0F1hm/ejccINtq6Rem98DJ/MW+fVFZrZ0xIQGQlPv5l aXisyMOxo/83ZrTBCELxERG6V0QSYouPqGdv7xjXuS1jVAEZNGTSMDEBct79Mz/jtcDp +7M+pgyXesrdoxSVqAMi/Z2t42ztpcEIHG8vA4KxffQIBHBTXWMZf4FNDoaWvYh5Dx4R 1Y7jFyeK4hgjLFwaqecqjFtfxC3xTMUZfoWn/+GlGMWmWV31ebEr63tkeTMPmm9zp4YK U5Ew== 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 y123si1630682pfy.18.2019.02.06.15.48.37; Wed, 06 Feb 2019 15:48:52 -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 S1726547AbfBFXsZ (ORCPT + 99 others); Wed, 6 Feb 2019 18:48:25 -0500 Received: from mail-ot1-f68.google.com ([209.85.210.68]:37140 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726161AbfBFXsZ (ORCPT ); Wed, 6 Feb 2019 18:48:25 -0500 Received: by mail-ot1-f68.google.com with SMTP id s13so15257385otq.4; Wed, 06 Feb 2019 15:48:24 -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=2km3dMyZpRUU5hnOZjk3ra+UsEl0QjP4uRCEE8dLVpA=; b=aiZAt8Ho0m4MD5zZLLh8kcKSA8T7ZdwhsYP/ig5YObJazOXjZLskBrK5mvtCVbq4hU LsaVB/VYrN8h6lmsKGkumN7UBCx78KgD+qAZCEipAEWFBrJRzVj9Yt8mOLkyvgyGbG06 kqYaWBk2OR9g1jPFysxLZ/3WJdCtIQfLAYW7ILAHlMQELQqzJTs0xFRYWyxcPNdE4hYi MJOBd0Fb4Uow0I4TNfeKnD+hGLxHtz8+qhLKgCpz7WBqDXmvdtu6sdtXVIVNlQZI2dJ/ QE+PxYQIN8evhhwe64BKyCSQrCE6+MFZ72PhRWnG2dMV9dXcTTqP8YxnIP8JyoCxvNBa I/qg== X-Gm-Message-State: AHQUAub6VNSoXocXtabF2Exg0Yw8LhNpMWy90mRGT75PQi51Y5ZiR39m Fz69ZAW9UjxM/ewypV4Kdm326PcU101xraCydouppfAO X-Received: by 2002:aca:f08b:: with SMTP id o133mr988016oih.32.1549496904026; Wed, 06 Feb 2019 15:48:24 -0800 (PST) MIME-Version: 1.0 References: <20190124230724.10022-1-keith.busch@intel.com> <20190124230724.10022-5-keith.busch@intel.com> <20190205145227.GG17950@kroah.com> <20190206230953.GB30221@localhost.localdomain> In-Reply-To: <20190206230953.GB30221@localhost.localdomain> From: "Rafael J. Wysocki" Date: Thu, 7 Feb 2019 00:48:12 +0100 Message-ID: Subject: Re: [PATCHv5 04/10] node: Link memory nodes to their compute nodes To: Keith Busch Cc: "Rafael J. Wysocki" , Greg Kroah-Hartman , Linux Kernel Mailing List , ACPI Devel Maling List , Linux Memory Management List , 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 Thu, Feb 7, 2019 at 12:10 AM Keith Busch wrote: > > On Tue, Feb 05, 2019 at 04:17:09PM +0100, Rafael J. Wysocki wrote: > > wrote: > > > > > > When you use a "raw" kobject then userspace tools do not see the devices > > > and attributes in libraries like udev. > > > > And why would they need it in this particular case? > > > > > So unless userspace does not care about this at all, > > > > Which I think is the case here, isn't it? > > > > > you should use a 'struct device' where ever > > > possible. The memory "savings" usually just isn't worth it unless you > > > have a _lot_ of objects being created here. > > > > > > Who is going to use all of this new information? > > > > Somebody who wants to know how the memory in the system is laid out AFAICS. > > Yes, this is for user space to make informed decisions about where it > wants to allocate/relocate hot and cold data with respect to particular > compute domains. So user space should care about these attributes, > and they won't always be static when memory hotplug support for these > attributes is added. > > Does that change anything, or still recommending kobject? I don't have a > strong opinion either way and have both options coded and ready to > submit new version once I know which direction is most acceptable. If you want to make dynamic changes to the sysfs directories under this object, uevents generated by device registration and unregstration may be useful. However, they only trigger automatically when you register and unregister, so presumably you'd need to do that every time for the changes to trigger an update in user space. Also, whoever is interested in this data would need to listen to the uevents to get notified. OTOH, you can call kobject_uevent() for the "raw" kobjects too. Anyway, if Greg really prefers struct device to be used here, that's fine by me, but since the uevents in question are going to be part of your user space I/F then, it may be good to take that into consideration. :-) After all, you need to know how you want the I/F to work.