Re: [PATCH 2.2.10] Re: Problem with memmap file with SMP

Stephen C. Tweedie (sct@redhat.com)
Thu, 15 Jul 1999 17:34:44 +0100 (BST)


Hi,

On Thu, 15 Jul 1999 09:24:24 -0700 (PDT), Linus Torvalds
<torvalds@transmeta.com> said:

> On Thu, 15 Jul 1999, Stephen C. Tweedie wrote:
>>
>> 0 is fine. The case we are trying to detect is an alias between the
>> source buffer and the page cache, which is a kernel VA. 0 can never be
>> mistaken for a valid kernel address, so it's just fine. Any user
>> address would be OK --- it's only with kernel addresses that we'd have
>> to be careful.

> 0 wouldn't be acceptable for 2.3.x, as it CAN be a kernel address on a
> number of machines. But as the problem doesn't exist in 2.3.x anyway I
> guess that is a non-issue.

> It's a singularly ugly fix, regardless. I would never let code like that
> near any of my kernels, but Alan is the one who gets to decide in the
> stable tree.

Absolutely. The trouble is that a correct fix --- the clean way of
doing things --- is to back-port the 2.3 changes, which is obviously a
non-starter. The only real alternative to detecting the special case is
to differentiate between writes from the page cache and writes from user
buffers when we call f_op->write(), but that is a change in the
definition of the VFS which I wanted to avoid for 2.2.

The code paths in 2.2 simply don't let us pass information to the fs
about whether or not an update_vm_cache() is necessary or not. Either
we check in update_vm_cache or we change the VFS definitions. If Alan
would prefer the latter then I'm certainly willing to code it that way,
but it will be incompatible with existing fs modules.

--Stephen

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/