From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <476BF0E3.8010201@hp.com> Date: Fri, 21 Dec 2007 11:59:15 -0500 From: Mark Seger MIME-Version: 1.0 Subject: Re: SLUB References: <476A850A.1080807@hp.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org Return-Path: To: Christoph Lameter Cc: linux-mm@kvack.org List-ID: > I think we better keep it public (so that it goes into the archive). Here > a short description of the field in /sys/kernel/slab/ that you > would need > > -r--r--r-- 1 root root 4096 Dec 20 11:41 object_size > > The size of an object. Subtract slab_size - object_size and you have the > per object overhead generated by alignements and slab metadata. Does not > change you only need to read this once. > > -r--r--r-- 1 root root 4096 Dec 20 11:41 objects > > Number of objects in use. This changes and you may want to monitor it. > > -r--r--r-- 1 root root 4096 Dec 20 11:41 slab_size > > Total memory used for a single object. Read this only once. > > -r--r--r-- 1 root root 4096 Dec 20 11:41 slabs > > Number of slab pages in use for this slab cache. May change if slab is > extended. > Sorry for being confused, but I thought that a slab was made up of a number of objects and above you're saying slab_size is the size of single object. Furthermore, looking at /sys/slab/shmem_inode_cache I see: object_size = 960 objs_per_slab = 4 which implies a slab is made up more than one object, so which is it? could it be a simple matter of clearer names? I also see slab_size = 968 which certainly supports your statement about this being the size of an object and it looks like there is 8 bytes of overhead. finally, I also see objects = 242 and objects * obj_per_slab = slabsize. is that a coincidence? -mark -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org