[lkml]   [2000]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: spin_lock forgets to clobber memory and other smp fixes [was
On Thu, 7 Sep 2000, Jamie Lokier wrote:

>Common Subexpression Elimination.
>If the compiler sees an expression equivalent to one it evaluated
>earlier, there is no need to evaluate it a second time.
>So "a = x+x; b = x+x" will evaluate "x+x" just once and store it twice.

I didn't know the name of that particular optimization, thanks.

>In more complicated cases, where the result of the first read is
>actually used before the "asm", the "memory" clobber causes the second
>read to occur as well as the first.



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:1.020 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site