Re: [v2.6.26] what's brewing in x86.git for v2.6.26

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andi Kleen <andi@...>
Cc: Ingo Molnar <mingo@...>, <linux-kernel@...>
Date: Thursday, April 17, 2008 - 9:33 am

On Thu, 17 Apr 2008 12:51:09 +0200, "Andi Kleen" <andi@firstfloor.org>
said:

Hi,

The version that is in x86#testing _will_ do this optimization. For
32 node SMP on x86_64 this results in:

<__first_cpu>:
    mov    $0x20,%edx   (inlined...)
    mov    $0x100000000,%rax
    or     (%rdi),%rax
    bsf    %rax,%rax    (... find_first_bit)
    cmp    $0x20,%eax   (superfluous paranoia...)
    cmovg  %edx,%eax    (... for broken find_first_bit)
    retq   

and something similar for __next_cpu.


for_each_cpu code looks fine:

    mov    $cpumapaddress,%rdi
    callq  <__first_cpu>
    jmp    end_of_body
start_of_body:
    ...
end_of_body:
    mov    $cpumapaddress,%edi  ($mapaddress often cached in register)
    callq  <__next_cpu>
    cmp    $0x1f,%eax
    jle    start_of_body

On the other hand it would be nice to change __first_cpu and
__next_cpu into inline functions. If all implementations of
find_first_bit and find_next_bit would reliably return max_size
if no bits were found, that would be a good thing to do. The
generic one does return max_size.

Greetings,
    Alexander

-- 
  Alexander van Heukelum
  heukelum@fastmail.fm

-- 
http://www.fastmail.fm - One of many happy users:
  http://www.fastmail.fm/docs/quotes.html

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

Messages in current thread:
[v2.6.26] what's brewing in x86.git for v2.6.26, Ingo Molnar, (Wed Apr 16, 4:23 pm)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Roland Dreier, (Wed Apr 16, 4:37 pm)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Suresh Siddha, (Wed Apr 16, 6:18 pm)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Andi Kleen, (Wed Apr 16, 4:50 pm)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Alexander van Heukelum, (Thu Apr 17, 6:06 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Andi Kleen, (Thu Apr 17, 6:51 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Alexander van Heukelum, (Thu Apr 17, 9:33 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Ingo Molnar, (Fri Apr 18, 4:38 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Andi Kleen, (Fri Apr 18, 6:51 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Andrew Morton, (Fri Apr 18, 2:27 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, David Miller, (Fri Apr 18, 2:38 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Ingo Molnar, (Fri Apr 18, 3:47 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Andrew Morton, (Fri Apr 18, 4:00 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Christoph Hellwig, (Fri Apr 18, 4:11 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, David Miller, (Fri Apr 18, 4:18 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Ingo Molnar, (Fri Apr 18, 8:48 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Andrew Morton, (Thu Apr 17, 3:48 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Andrew Morton, (Thu Apr 17, 3:25 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Pekka Enberg, (Thu Apr 17, 3:45 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Andrew Morton, (Thu Apr 17, 4:20 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Pekka J Enberg, (Thu Apr 17, 4:32 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Pekka Enberg, (Thu Apr 17, 4:34 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Ingo Molnar, (Thu Apr 17, 4:40 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Andrew Morton, (Thu Apr 17, 4:42 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Christoph Hellwig, (Thu Apr 17, 7:49 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Ingo Molnar, (Thu Apr 17, 7:56 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Andrew Morton, (Thu Apr 17, 2:01 pm)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Ingo Molnar, (Thu Apr 17, 2:51 pm)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Tomasz Kłoczko, (Fri Apr 18, 5:33 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Ingo Molnar, (Fri Apr 18, 5:42 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Andrew Morton, (Thu Apr 17, 3:57 pm)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Ingo Molnar, (Thu Apr 17, 4:18 pm)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Ingo Molnar, (Thu Apr 17, 4:30 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Andrew Morton, (Thu Apr 17, 4:40 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Ingo Molnar, (Thu Apr 17, 5:06 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Andrew Morton, (Thu Apr 17, 5:18 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Ingo Molnar, (Thu Apr 17, 5:30 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Andrew Morton, (Thu Apr 17, 5:53 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Andrew Morton, (Thu Apr 17, 5:36 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Andi Kleen, (Thu Apr 17, 6:11 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Andrew Morton, (Thu Apr 17, 6:18 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Andi Kleen, (Thu Apr 17, 6:29 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Pekka Enberg, (Thu Apr 17, 6:19 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Andrew Morton, (Thu Apr 17, 6:33 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Pekka Enberg, (Thu Apr 17, 6:41 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Ingo Molnar, (Thu Apr 17, 6:38 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Pekka Enberg, (Thu Apr 17, 6:42 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Nick Piggin, (Fri Apr 18, 7:12 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Arjan van de Ven, (Thu Apr 17, 10:01 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Ingo Molnar, (Fri Apr 18, 8:41 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Ingo Molnar, (Thu Apr 17, 11:26 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Ingo Molnar, (Thu Apr 17, 5:46 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Andrew Morton, (Thu Apr 17, 6:06 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Vegard Nossum, (Thu Apr 17, 2:47 pm)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Ingo Molnar, (Thu Apr 17, 3:27 pm)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Ingo Molnar, (Thu Apr 17, 3:35 pm)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Vegard Nossum, (Thu Apr 17, 3:39 pm)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Andrew Morton, (Thu Apr 17, 3:43 pm)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Vegard Nossum, (Thu Apr 17, 4:39 pm)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Andrew Morton, (Thu Apr 17, 4:55 pm)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, David Miller, (Thu Apr 17, 4:45 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Andrew Morton, (Thu Apr 17, 4:54 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Andrew Morton, (Thu Apr 17, 4:56 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, David Miller, (Thu Apr 17, 5:19 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Andrew Morton, (Thu Apr 17, 5:33 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Andrew Morton, (Thu Apr 17, 4:14 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Johannes Weiner, (Thu Apr 17, 6:32 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Andrew Morton, (Thu Apr 17, 6:50 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Avi Kivity, (Thu Apr 17, 4:57 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Christoph Hellwig, (Thu Apr 17, 7:49 am)
Re: [v2.6.26] what's brewing in x86.git for v2.6.26, Andrew Morton, (Thu Apr 17, 1:36 pm)