From: pavel@ucw.cz (Pavel Machek)
To: linux-arm-kernel@lists.infradead.org
Subject: shared memory problem on ARM v5TE using threads
Date: Sun, 20 Dec 2009 20:56:15 +0100 [thread overview]
Message-ID: <20091220195615.GF23917@elf.ucw.cz> (raw)
In-Reply-To: <20091218191626.GG5527@n2100.arm.linux.org.uk>
On Fri 2009-12-18 19:16:26, Russell King - ARM Linux wrote:
> On Fri, Dec 18, 2009 at 07:45:19PM +0100, Pavel Machek wrote:
> > But that's pretty unusual situation, right?
>
> It may be uncommon, but it's something that must work - not only is it
> a quality of implementation issue, but its also a data corruption issue.
> Get it wrong and you silently corrupt files on your filesystems.
>
> As I've said earlier in the thread, we know that db4 does this. Not
> fixing this means that we really don't care about any program which
> uses db4, or data contained within a db4 database.
I'm not trying to argue it does not need to be fixed; I'm trying to
say that performance penalty in unusual case may be ok.
> > So what about...
> >
> > a) flush L2 on context switch
>
> If you go to that extent, the system will probably perform better with
> the L2 cache permanently disabled.
Are you sure? Context switches are not that common (3 times a second
in number-crunching cases?) and L2 cache should help performance quite
a lot.
> > b) disable L2 when thread has maps one physical address twice
>
> Due to the way the L2 cache works, you have to disable L2 and flush it
> when switching to the thread, and re-enable L2 when you switch away.
> Merely flushing it when switching away won't work.
>
> In order to disable or enable the L2 cache, the L1 cache must be
> flushed and disabled - and that would have to be done with all IRQs
> (including FIQs) disabled to ensure that its done atomically.
>
> I don't think this is a sane option.
Well, it sounds slow and it will not be easy to implement. It really
depends how much L2 cache helps on those systems. (I'd guess PC with
L2 disabled would run at half a speed. If performance penalty for L2
disabled is similar on those systems, extra complexity may be worth
it.)
So I guess someone with affected system needs to do some benchmarking.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2009-12-20 19:56 UTC|newest]
Thread overview: 71+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-04 11:23 shared memory problem on ARM v5TE using threads Heiko Schocher
2009-12-04 12:26 ` Joerg Wagner
2009-12-04 13:13 ` Russell King - ARM Linux
2009-12-04 13:42 ` Heiko Schocher
2009-12-04 15:42 ` Russell King - ARM Linux
2009-12-04 15:58 ` Heiko Schocher
2009-12-04 16:38 ` Russell King - ARM Linux
2009-12-04 16:59 ` Russell King - ARM Linux
2009-12-04 17:53 ` Heiko Schocher
2009-12-04 19:13 ` Russell King - ARM Linux
2009-12-04 19:35 ` Heiko Schocher
2009-12-06 13:53 ` Ronen Shitrit
2009-12-06 14:16 ` Russell King - ARM Linux
2009-12-07 7:54 ` Ronen Shitrit
2009-12-07 8:33 ` Heiko Schocher
2009-12-07 11:31 ` saeed bishara
2009-12-07 11:42 ` Russell King - ARM Linux
2009-12-07 12:16 ` Ronen Shitrit
2009-12-07 12:27 ` Heiko Schocher
2009-12-07 12:42 ` Ronen Shitrit
2009-12-07 15:24 ` Nicolas Pitre
2009-12-07 12:24 ` Heiko Schocher
2009-12-07 12:55 ` Ronen Shitrit
2009-12-07 14:52 ` Russell King - ARM Linux
2009-12-07 15:37 ` Nicolas Pitre
2009-12-07 17:05 ` Russell King - ARM Linux
2009-12-07 17:33 ` Nicolas Pitre
2009-12-07 17:56 ` Russell King - ARM Linux
2009-12-13 11:48 ` Ronen Shitrit
2009-12-13 12:00 ` Russell King - ARM Linux
2009-12-13 12:06 ` Russell King - ARM Linux
2009-12-13 15:42 ` Ronen Shitrit
2009-12-14 13:13 ` christian pellegrin
2009-12-14 14:46 ` Ronen Shitrit
2009-12-14 17:48 ` christian pellegrin
2009-12-14 20:14 ` Nicolas Pitre
2009-12-15 7:50 ` saeed bishara
2009-12-15 11:01 ` christian pellegrin
2009-12-15 15:31 ` christian pellegrin
2009-12-15 17:18 ` Russell King - ARM Linux
2009-12-16 14:08 ` Ronen Shitrit
2009-12-15 17:14 ` Russell King - ARM Linux
2009-12-16 16:35 ` christian pellegrin
2009-12-16 17:38 ` christian pellegrin
2009-12-17 7:35 ` Ronen Shitrit
2009-12-18 20:22 ` Nicolas Pitre
2009-12-18 20:44 ` Russell King - ARM Linux
2009-12-18 21:23 ` Nicolas Pitre
2009-12-18 21:57 ` Russell King - ARM Linux
2009-12-19 11:24 ` christian pellegrin
2009-12-19 11:27 ` [PATCH] Fix coherency problems on ARM v5 with L2 PIPT cache Christian Pellegrin
2009-12-14 19:59 ` shared memory problem on ARM v5TE using threads Nicolas Pitre
2009-12-15 10:33 ` christian pellegrin
2009-12-18 18:45 ` Pavel Machek
2009-12-18 19:00 ` Nicolas Pitre
2009-12-20 19:51 ` Pavel Machek
2009-12-20 22:32 ` Nicolas Pitre
2009-12-21 7:40 ` Pavel Machek
2009-12-18 19:16 ` Russell King - ARM Linux
2009-12-20 19:56 ` Pavel Machek [this message]
2009-12-17 11:31 ` Heiko Schocher
2009-12-18 8:08 ` christian pellegrin
2009-12-07 15:40 ` Russell King - ARM Linux
2009-12-07 15:57 ` Nicolas Pitre
2009-12-07 16:06 ` Ronen Shitrit
2009-12-07 17:17 ` Russell King - ARM Linux
2009-12-04 17:25 ` Nicolas Pitre
2009-12-04 17:31 ` Russell King - ARM Linux
2009-12-04 17:47 ` Heiko Schocher
2009-12-04 17:56 ` Nicolas Pitre
2009-12-04 19:33 ` Heiko Schocher
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=20091220195615.GF23917@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).