Re: kmalloc optimization

From: Andreas Dilger (adilger@turbolinux.com)
Date: Sun Aug 27 2000 - 22:48:39 EST


Davic Wragg writes:
> Intel's P6 processors have BSR, a cheap (couple of cycles) instruction
> to find the most significant set bit in a word. This can be used in
> kmalloc to identify the slab cache to allocate from; it's quicker than
> the linear search through to cache_sizes array that is currently used.

Actually, what else can benefit from this is searching for free blocks
or inodes in the filesystem bitmaps. It would be especially useful on
nearly-full filesystems.

Cheers, Andreas

-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Aug 31 2000 - 21:00:20 EST