[lkml]   [2000]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: kmalloc optimization
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?" -- Dogbert
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:38    [W:0.043 / U:1.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site