From: John Richard Moser <nigelenki@comcast.net>
To: Arjan van de Ven <arjan@infradead.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Can context switches be faster?
Date: Thu, 12 Oct 2006 14:56:33 -0400 [thread overview]
Message-ID: <452E8FE1.7080503@comcast.net> (raw)
In-Reply-To: <1160678231.3000.451.camel@laptopd505.fenrus.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Arjan van de Ven wrote:
> On Thu, 2006-10-12 at 14:25 -0400, John Richard Moser wrote:
>
> Hi,
>
>> So apparently most CPUs virtually address L1 cache and physically
>> address L2; but sometimes physically addressing L1 is better.. hur.
>
> if you are interested in this I would strongly urge you to read Curt
> Schimmel's book (UNIX(R) Systems for Modern Architectures: Symmetric
> Multiprocessing and Caching for Kernel Programmers); it explains this
> and related materials really really well.
>
That will likely be more useful when I've got more background knowledge;
right now my biggest problem is I'm inexperienced and haven't yet gotten
my 2-year compsci degree (more importantly, the associated knowledge
that goes with it), so things like compiler design are like "There's a
concept of turning stuff into trees and associating actions with virtual
registers and then turning that into real register accounting and
instructions, but I really don't know WTF it's doing."
I imagine once I get into the 4-year stuff I'll be able to digest
something like that; so I'll keep that in mind. The '1st year compsci
student' crutch is annoying and I need to get rid of it so I don't feel
so damn crippled trying to do anything.
>
>> - Does the current code act on these behaviors, or just flush all
>> cache regardless?
>
> the cache flushing is a per architecture property. On x86, the cache
> flushing isn't needed; but a TLB flush is. Depending on your hardware
> that can be expensive as well.
>
Mm. TLB flush is expensive, and pretty unavoidable unless you do stupid
things like map libc into the same address everywhere. TLB flush
between threads in the same process is probably avoidable; aren't
threads basically processes with the same PID in something called a
thread group? (Hmm... creative scheduling possibilities...)
> Greetings,
> Arjan van de Ven
>
>
- --
We will enslave their women, eat their children and rape their
cattle!
-- Bosc, Evil alien overlord from the fifth dimension
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iQIVAwUBRS6P4As1xW0HCTEFAQLcjQ//aQF7RWL4INtwl8ZPI35ueTj6y7Ap5vdP
bJUjXOgF4M/yyyRB9KThTaoRxUkTapPbUaNAa2VBU5c8vBW3anyTuGjUXhW7dBUZ
Xfk0611xEVrEsCcwNjpRhpZH55npjaymzSvdDulqdVThLJCDxkYGonL+6K7T5PRF
eRqFvniRur/pNormpkxzXoqxEqhO0dpy/RWbMuhF4hGpCLBz6ZNXWjRDJrzTtoFp
dhDAy5sJuf4gGqG0oQY2FN9FzFYrCguKGReP/xuzWhqUUyxvKrgbJLFBj1Zut3Uc
Gm59FhSpfKyJifJGGvFhrMxMKLL/wVsLxfRUbvFuD8Xki6UxxQ3Kve2AVihKcRz6
RpYDQesAG0TgP9GypM8eT5uezKnzIe1FJpg9619Isem11dogvuMA6h7qgdJH7+gb
E8yWeVFoZx1GPNCpQgZhy2IijztgYS40GMf+0xoUZcanE3pO93+85DNxapcyGkNY
kYIGSiugKDlQlIVaBov8+EtLr6hILBXPT9+PjwD9EWWjjQZB9iJy+ROnKntd+twe
knNYHm6aKuXVxmndfrzW+VDDN4I0TnbD3ctoepkEUQK2RFoBAt5tEceFmI6YILSr
w/h71yBztmvMAzSe6vEVSKN95jEg7UGd09UQN/GbcEJvw2s5l+HL1LGVRIbR0YN/
4gK2kAq28eA=
=Grg2
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2006-10-12 18:56 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-12 15:44 Can context switches be faster? John Richard Moser
2006-10-12 15:53 ` John Richard Moser
2006-10-12 17:19 ` Russell King
2006-10-12 18:25 ` John Richard Moser
2006-10-12 18:37 ` Arjan van de Ven
2006-10-12 18:56 ` John Richard Moser [this message]
2006-10-12 19:02 ` Arjan van de Ven
2006-10-13 11:05 ` James Courtier-Dutton
2006-10-13 14:51 ` Chase Venters
2006-10-12 18:20 ` Phillip Susi
2006-10-12 18:29 ` John Richard Moser
2006-10-13 2:53 ` Andrew James Wade
2006-10-13 5:29 ` John Richard Moser
2006-10-13 16:56 ` Andrew James Wade
2006-10-13 17:24 ` John Richard Moser
2006-10-12 19:57 ` Chris Friesen
2006-10-12 20:23 ` John Richard Moser
2006-10-12 20:29 ` Arjan van de Ven
2006-10-12 20:36 ` John Richard Moser
2006-10-12 20:35 ` Jeremy Fitzhardinge
2006-10-13 23:32 ` Andreas Mohr
2006-10-13 23:47 ` David Lang
2006-10-14 0:14 ` Jeremy Fitzhardinge
2006-10-14 0:30 ` Alan Cox
2006-10-14 0:14 ` Jeremy Fitzhardinge
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=452E8FE1.7080503@comcast.net \
--to=nigelenki@comcast.net \
--cc=arjan@infradead.org \
--cc=linux-kernel@vger.kernel.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