lkml.org 
[lkml]   [2005]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: kernel stack size
Steven Rostedt wrote:

>On Sun, 2005-04-03 at 09:10 +0200, Manfred Spraul wrote:
>
>
>
>>Yes - sem or spin locks are quicker as long as no cache line transfers
>>are necessary. If the semaphore is accessed by multiple cpus, then
>>kmalloc would be faster: slab tries hard to avoid taking global locks.
>>I'm not speaking about contention, just the cache line ping pong for
>>acquiring a free semaphore.
>>
>>
>
>Without contention, is there still a problem with cache line ping pong
>of acquiring a free semaphore?
>
>I mean, say only one task is using a given semaphore. Is there still
>going to be cache line transfers for acquiring it? Even if the task in
>question stays on a CPU. Is the "LOCK" on an instruction that expensive
>even if the other CPUs haven't accessed that location of memory.
>
>
>
No. If everything is cpu-local, then there are obviously no cache line
transfers. LOCK is not that expensive. On a Pentium 3, it was 20 cpu
cycles. On an Athlon 64, it's virtually free.

--
Manfred

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-04-06 13:31    [W:0.040 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site