On Mon, Oct 06, 2003 at 01:29:20PM -0700, Patrick Mochel wrote:
Uh, that's about the same thing I suggested, though probably not as concisely:
"As I said before, I don't know the right solution, but the directions to look in are related to attribute groups. Attributes definitely consume the most amount of memory (as opposed to the kobject hierachy), so delaying their creation would help, hopefully without making the interface too awkward.
Ok.. attributes do consume maximum in sysfs. In the system I mentioned
leaf dentries are about 65% of the total.
You can also use the assumption that an attribute group exists for all the kobjects in a kset, and that a kobject knows what kset it belongs to. And
That's not correct... kobject corresponding to /sys/block/hda/queue doesnot know which kset it belongs to and what are its attributes. Same
for /sys/block/hda/queue/iosched.
that eventually, all attributes should be added as part of an attribute group.."
Attributes are the leaf entries, and they don't need to always exist. But, you have easy access to them via the attribute groups of the ksets the kobjects belong to.
Having backing store just for leaf dentries should be fine. But there is _no_ easy access for attributes. For this also I see some data change required as of now. The reasons are - not all kobjects belong to a kset. For example, /sys/block/hda/queue
- not all ksets have attribute groups