From: Manfred Spraul <manfred@colorfullife.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: kernel stack size
Date: Sun, 03 Apr 2005 21:23:30 +0200 [thread overview]
Message-ID: <425042B2.4080403@colorfullife.com> (raw)
In-Reply-To: <1112551304.27149.126.camel@localhost.localdomain>
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
next prev parent reply other threads:[~2005-04-03 19:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-02 20:14 kernel stack size Manfred Spraul
2005-04-02 22:15 ` Steven Rostedt
2005-04-03 7:10 ` Manfred Spraul
2005-04-03 18:01 ` Steven Rostedt
2005-04-03 19:23 ` Manfred Spraul [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-04-02 17:46 ooyama eiichi
2005-04-02 17:53 ` Chris Wedgwood
2005-04-02 18:15 ` ooyama eiichi
2005-04-02 18:24 ` Chris Wedgwood
2005-04-02 18:48 ` ooyama eiichi
2005-04-02 19:04 ` Steven Rostedt
2005-04-02 19:37 ` Al Viro
2005-04-02 19:52 ` Steven Rostedt
2005-04-02 18:29 ` Brian Gerst
2003-10-09 19:14 Punj, Arun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=425042B2.4080403@colorfullife.com \
--to=manfred@colorfullife.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox