[lkml]   [2002]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] 2.5.21 Nonlinear CPU support
Anton Altaparmakov wrote:
>> Note that there is no requirement that we're still on cpu "cpu" when
>> we allocate the buffer. Furthermore, if we fail, we just loop right
>> back to the top.
> What is the point though? Why not just:
> if (!unlikely(decompression_buffers)) {
> down_sem();
> allocate_decompression_buffers();
> up_sem();
> }
> And be done with it?
> I don't see any justification for the increased complexity...

Race condition -- you have to drop out of the critical section before
you grab the allocation sempahore, and another CPU can grab the
semaphore in that time.

Thus, the buffers might appear right under your nose.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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