Re: [RFC][PATCH] drivers: base: dynamic memory block creation

From: Cody P Schafer
Date: Wed Aug 14 2013 - 17:37:37 EST


On 08/14/2013 02:14 PM, Seth Jennings wrote:
>An existing tool would not work
>with this patch (plus boot option) since it would not know how to
>show/hide things. It lets_part_ of those existing tools get reused
>since they only have to be taught how to show/hide things.
>
>I'd find this really intriguing if you found a way to keep even the old
>tools working. Instead of having an explicit show/hide, why couldn't
>you just create the entries on open(), for instance?
Nathan and I talked about this and I'm not sure if sysfs would support
such a thing, i.e. memory block creation when someone tried to cd into
the memory block device config. I wouldn't know where to start on that.


Also, I'd expect userspace tools might use readdir() to find out what memory blocks a system has (unless they just stat("memory0"), stat("memory1")...). I don't think filesystem tricks (at least within sysfs) are going to let this magically be solved without breaking the userspace API.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/