[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1328905759.25989.57.camel@laptop>
Date: Fri, 10 Feb 2012 21:29:19 +0100
From: Peter Zijlstra <a.p.zijlstra@...llo.nl>
To: Gilad Ben-Yossef <gilad@...yossef.com>
Cc: Chris Metcalf <cmetcalf@...era.com>,
Frederic Weisbecker <fweisbec@...il.com>,
linux-kernel@...r.kernel.org, Christoph Lameter <cl@...ux.com>,
linux-mm@...ck.org, Pekka Enberg <penberg@...nel.org>,
Matt Mackall <mpm@...enic.com>,
Sasha Levin <levinsasha928@...il.com>,
Rik van Riel <riel@...hat.com>,
Andi Kleen <andi@...stfloor.org>, Mel Gorman <mel@....ul.ie>,
Andrew Morton <akpm@...ux-foundation.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
Avi Kivity <avi@...hat.com>,
Michal Nazarewicz <mina86@...a86.com>,
Kosaki Motohiro <kosaki.motohiro@...il.com>,
Milton Miller <miltonm@....com>
Subject: Re: [v7 0/8] Reduce cross CPU IPI interference
On Fri, 2012-02-10 at 22:13 +0200, Gilad Ben-Yossef wrote:
> My current understanding is that if I have a real time task and wish it
> have a deterministic performance time, you should call mlockall() to lock
> the program data and text into physical memory so that a less often taken
> branch or access to a new data region will not result in a page fault.
>
> You still have to worry about TLB misses on non hardware page table
> walk architecture, but at least everything is in the page tables
>
> If there is a better way to do this? I'm always happy to learn new
> ways to do things. :-)
A rt application usually consists of a lot of non-rt parts and a usually
relatively small rt part. Using mlockall() pins the entire application
into memory, which while on the safe side is very often entirely too
much.
The alternative method is to only mlock the text and data used by the rt
part. You need to be aware of what text runs in your rt part anyway,
since you need to make sure it is in fact deterministic code.
One of the ways of achieving this is using a special linker section for
your vetted rt code and mlock()'ing only that text section.
On thread creation, provide a custom allocated (and mlock()'ed) stack
etc..
Basically, if you can't tell a-priory what code is part of your rt part,
you don't have an rt part ;-)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists