Re: [Patch] Delete sysfs_dirent.s_count, saving ~100kB on my system

From: Andrew Morton
Date: Wed Dec 01 2004 - 16:09:26 EST


"Adam J. Richter" <adam@xxxxxxxxxxxxx> wrote:
>
> Here is a rewrite of my patch to remove sysfs_dirent.s_count,
> reducing the memory chunk that kmalloc uses for sysfs_dirent from
> 64 to 32 bytes, thereby saving about 120kB for the 3700+ nodes in
> /sys on the ordinary PC on which I am typing this message.

That's all well and good, but sysfs_new_dirent() should be using a
standalone slab cache for allocating sysfs_dirent instances. That way, we
use 36 bytes for each one rather than 64.
-
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/