login
Header Space

 
 

Re: Alternative implementation of the generic __ffs

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Joe Perches <joe@...>, Matti Aarnio <matti.aarnio@...>
Cc: Harvey Harrison <harvey.harrison@...>, Alexander van Heukelum <heukelum@...>, LKML <linux-kernel@...>
Date: Sunday, April 20, 2008 - 4:42 am

On Sat, 19 Apr 2008 20:06:57 -0700, "Joe Perches" <joe@perches.com>
said:

Hi,

The glibc version is based on a table-lookup. This makes it
behave differently in hot and cold cache situations. That's
fine if __ffs is used in tight loops, but in the kernel such
use of __ffs is avoided because it might be slow. I added it
to the benchmark, but it would need testing for the cold
cache case too.

As for the importance of __ffs in the kernel: as far as I
know the hot-spots in the kernel using __ffs are the
schedular (sched_find_first_bit) and the cpu mask walking
code (for_each_cpu_mask).

Greetings,
    Alexander


Added, thanks.

-- 
  Alexander van Heukelum
  heukelum@fastmail.fm

-- 
http://www.fastmail.fm - A no graphics, no pop-ups email service

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] x86: generic versions of find_first_(zero_)bit, conv..., Alexander van Heukelum, (Mon Mar 31, 1:15 pm)
Re: [PATCH] x86: generic versions of find_first_(zero_)bit, ..., Alexander van Heukelum, (Tue Apr 1, 5:46 am)
Re: [PATCH] x86: generic versions of find_first_(zero_)bit, ..., Alexander van Heukelum, (Sun Apr 6, 2:51 pm)
Re: [PATCH] x86: generic versions of find_first_(zero_)bit, ..., Alexander van Heukelum, (Mon Apr 7, 6:25 am)
Alternative implementation of the generic __ffs, Alexander van Heukelum, (Fri Apr 18, 4:18 pm)
Re: Alternative implementation of the generic __ffs, dean gaudet, (Fri Apr 18, 7:46 pm)
Re: Alternative implementation of the generic __ffs, Harvey Harrison, (Fri Apr 18, 8:09 pm)
Re: Alternative implementation of the generic __ffs, dean gaudet, (Fri Apr 18, 8:20 pm)
Re: Alternative implementation of the generic __ffs, Joe Perches, (Fri Apr 18, 8:58 pm)
Re: Alternative implementation of the generic __ffs, Harvey Harrison, (Fri Apr 18, 9:04 pm)
Re: Alternative implementation of the generic __ffs, dean gaudet, (Fri Apr 18, 9:11 pm)
Re: Alternative implementation of the generic __ffs, Joe Perches, (Fri Apr 18, 10:55 pm)
Re: Alternative implementation of the generic __ffs, Matti Aarnio, (Sat Apr 19, 6:29 pm)
Re: Alternative implementation of the generic __ffs, Joe Perches, (Sat Apr 19, 11:06 pm)
Re: Alternative implementation of the generic __ffs, Alexander van Heukelum, (Sun Apr 20, 4:42 am)
Re: Alternative implementation of the generic __ffs, Matti Aarnio, (Sun Apr 20, 8:31 am)
Re: Alternative implementation of the generic __ffs, Alexander van Heukelum, (Mon Apr 21, 7:43 am)
Re: Alternative implementation of the generic __ffs, dean gaudet, (Sat Apr 19, 12:13 am)
Re: Alternative implementation of the generic __ffs, Alexander van Heukelum, (Sat Apr 19, 8:10 am)
Re: Alternative implementation of the generic __ffs, Joe Perches, (Sat Apr 19, 2:17 pm)
Re: Alternative implementation of the generic __ffs, Alexander van Heukelum, (Sat Apr 19, 4:26 pm)
Re: Alternative implementation of the generic __ffs, Mikael Pettersson, (Sat Apr 19, 6:05 am)
[PATCH] x86: switch x86_64 to generic find_first_bit, Alexander van Heukelum, (Tue Apr 1, 11:41 am)
[PATCH] x86: optimize find_first_bit for small bitmaps, Alexander van Heukelum, (Tue Apr 1, 11:42 am)
[PATCH] x86: remove x86-specific implementations of find_fir..., Alexander van Heukelum, (Tue Apr 1, 11:47 am)
Re: [PATCH] x86: remove x86-specific implementations of find..., Alexander van Heukelum, (Thu Apr 3, 5:34 am)
Re: [PATCH] x86: generic versions of find_first_(zero_)bit, ..., Stephen Hemminger, (Mon Mar 31, 1:22 pm)
Re: [PATCH] x86: generic versions of find_first_(zero_)bit, ..., Alexander van Heukelum, (Mon Mar 31, 3:38 pm)
speck-geostationary