Subject: Re: Disallowing mmapping of NULL
To: None <tech-kern@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 01/29/2007 21:44:22
On Mon, Jan 29, 2007 at 10:35:36PM +0100, Joerg Sonnenberger wrote:
> 
> Yeah, other optimisations possible when you know that NULL is a valid
> (readable) address is more aggressive prefetch. IBM showed some
> interesting benchmarks with SPEC and XLC on PowerPC. Patching the NULL
> mapping on Linux and telling the compiler about it could improve
> performance up to 10% for individual tests.

hmmm....  Allowing the compiler to prefetch (presumably non-volatile) date
would be an interesting verifier for device drivers...

However in that case, you would arrange for some fixed data to be mapped at
address 0.  And since you don't care what it is, you would arrange for it
to be readonly and have a suitable value (eg 0xcc for i386).

	David

-- 
David Laight: david@l8s.co.uk