migrating proc from zone to objcache

Matthew Dillon dillon at apollo.backplane.com
Mon Mar 31 12:23:40 PDT 2008

    I both agree and disagree with Jeff.  I think the only *disadvantage*
    to using objcache for struct proc is that objcache must cache a minimum
    number of free structures to be efficient so the overall kernel memory
    use would be a bit greater verses uses kmalloc().  But I agree with Jeff
    in that objcache's biggest advantage is that you can keep structural state
    intact and struct proc might not be a good candidate (yet).

    What I suggest is that you convert struct proc from zone to kmalloc
    first, and then look into a possible objcache adaptation.  kmalloc
    is not slow.. it's a very fast allocator.  Objcache is probably a tad
    faster but not by much.  Where objcache really wins is in not having
    to completey reinitialize the allocated structures.

    Over the years I've removed (I think) all the dependancies on requiring
    the proc structure to be in stable memory so I believe it can be moved to
    kmalloc/objcache now without any major pain.

					Matthew Dillon 
					<dillon at backplane.com>

More information about the Kernel mailing list