Re: A couple of questions about slabifo
From: Kasper Dupont (kasperd_at_daimi.au.dk)
Date: 01/18/05
- Previous message: Kasper Dupont: "Re: Mapping C code to assembly instructions..."
- In reply to: Ilya: "A couple of questions about slabifo"
- Next in thread: Ilya: "Re: A couple of questions about slabifo"
- Reply: Ilya: "Re: A couple of questions about slabifo"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 18 Jan 2005 07:58:49 +0100
Ilya wrote:
>
> Hi:
>
> Just two clarification questions that should be easy to answer by the
> knowing ones:
>
> 1. Does all the dynamic memory allocated in the kernel listed in the
> /proc/slabinfo file?
No.
> There isn't any more memory that kernel uses which
> is not reflected in slabinfo?
There is. You can do allocations at different layers.
At the lowest layer we have functions dealing with
allocation of pages, for example the get_free_pages
function. Just about any allocation must be build on
top of this layer. But this lowest layer doesn't
export such useful data about allocations.
On the next layer we have the slab allocator. The
primary purpose of slab allocations is to allow
allocation of small objects without having to use a
full page for each object.
Again on top of the slab allocator we have kmalloc
which is intended for small variable size allocations.
Or any small allocation you do so rarely that it
doesn't make sense for it to have its own slab.
>
> 2. There are several rows at the bottom of slabinfo file that all start
> with 'size-'. Are they represent the memory allocated for the 'buddy'
> allocation system?
No, the buddy allocator is a lower layer. The size-
slabs are those used by kmalloc. But from one page
and up, it is a good idea for the size- slabs to
match the sizes supported by the underlying buddy
allocator.
> Also, what is the physical difference between the
> size-xxx and size-xxx(DMA)?
Architecture dependent I guess. But AFAIR on i386
the DMA allocations are below 16MB.
>
> 3. Is there a fundamental difference between the inode_cache line in
> /proc/slabinfo and the 'Cached' line in the /proc/memifo?
They are completely unrelated. The inode_cache line
will tell you how many inodes are currently cached.
The Cached line in /proc/meminfo will tell you how
many pages of file contents is currently cached.
-- Kasper Dupont
- Previous message: Kasper Dupont: "Re: Mapping C code to assembly instructions..."
- In reply to: Ilya: "A couple of questions about slabifo"
- Next in thread: Ilya: "Re: A couple of questions about slabifo"
- Reply: Ilya: "Re: A couple of questions about slabifo"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|