Re: [PATCHv5 04/10] node: Link memory nodes to their compute nodes

From: Keith Busch
Date: Wed Feb 06 2019 - 18:11:04 EST


On Tue, Feb 05, 2019 at 04:17:09PM +0100, Rafael J. Wysocki wrote:
> <gregkh@xxxxxxxxxxxxxxxxxxx> 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.