[Top] [All Lists]

Re: [PATCH] fix cache coherency issues

To: Atsushi Nemoto <>
Subject: Re: [PATCH] fix cache coherency issues
From: "Kevin D. Kissell" <>
Date: Tue, 14 Feb 2006 14:48:39 +0100
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <> <>
User-agent: Thunderbird 1.5 (X11/20051025)
Atsushi Nemoto wrote:
On Tue, 14 Feb 2006 17:56:57 +0900, Yoichi Yuasa <> 
yuasa> This patch fixed the boot problem, but the kernel still has
yuasa> cache coherency problem.

yuasa> ~# ./cachetest yuasa> Test separation: 4096 bytes: FAIL - cache not coherent

Thank you for testing.

As for the cachetest program, I think the test program is wrong.

It try to mmap offset 0 of a shared file to odd address page with
MAP_FIXED.  It means "I want non-coherent mapping if dcache alias
exists".  Currently the kernel surely gives what the program want.

The kernel might have to return EINVAL in such case, but I'm not sure
which is the right behavior.  Please look at David S. Miller's
comments, for example,

I've been maintaining for years that EINVAL is the correct
thing to do when the kernel detects that a user is requesting
a mapping that the kernel knows will create aliasing problems,
but this ran counter to the "serves the user right" philosophy
that seemed to dominate the Linux kernel community.  I'm
pleased to see that the tide seems to be shifting.  As an old-time
BSD/SysV hacker from the 1980s, I view system calls as a
contract with the user: if the kernel says it's OK, it's
supposed to work, period.

But I better get down off my soapbox before I launch into
my rant about the OOM killer being proof of a failed paradigm... ;o)


                Kevin K.

<Prev in Thread] Current Thread [Next in Thread>