linux-mips
[Top] [All Lists]

Re: flush_kernel_dcache_page() not needed ?

To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Subject: Re: flush_kernel_dcache_page() not needed ?
From: Franck Bui-Huu <vagabon.xyz@gmail.com>
Date: Mon, 03 Sep 2007 17:36:16 +0200
Cc: linux-mips@linux-mips.org
Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=IxtEy3WmD96ZLObx0esGxTv80WSgLLzkMrGz9sUpf2vNwWUgkhyodafljFQaK2jXGUAYNIuztrlmEXZzfLjgZA+tBY2PptfRUkx6k/r9fR8uZ+fd+FNJP7yn1kW6XO6yf041e+4S68hvzUi/H5mZbrCYBiQLINBydDkOKqMcLwA=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=mAu2UmTPwxsZ8USrKoykrNB5w/2q87l4rNlnthfR7PxQDLvih2H6QMYium7jT/tM8vfKMrwx9DSsYhvipWnc2Qq6SIAwqW5pxntS7xPLyshjep1w9QH8+CUAjwQ6BmI+g8NImJYPONbRLqtZiuCOdt0hEo8Tqp//W/pYAQNbEhg=
In-reply-to: <20070903.225239.61509667.anemo@mba.ocn.ne.jp>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <46D8089F.3010109@gmail.com> <20070903.225239.61509667.anemo@mba.ocn.ne.jp>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Thunderbird 2.0.0.5 (X11/20070719)
Atsushi Nemoto wrote:
> On Fri, 31 Aug 2007 14:25:03 +0200, Franck Bui-Huu <vagabon.xyz@gmail.com> 
> wrote:
>> I noticed that there's currently (v2.6.23-rc4) no implementation
>> of this function even for mips CPUs that have dcache aliasing.
>>
>> Could anybody explain why ?
> 
> Maybe because the API was not called by anybody until 2.6.23-rc1 :)
> 

But this function has been introduced since commit
5a3a5a98b6422d05c39eaa32c8b3f83840c7b768 ([PATCH] Add
flush_kernel_dcache_page() API) which had been merged during 2.6.16
merge window. So it's more than one year now...

Basically it gives a default implementation for all architectures. The
problem here is that this implementation may be boggus for
architectures that have dcache aliasing issue.

The sad thing is that the kernel will silently compile this default
implementation. At least, it could have showed a big fat warning
during the building process.

> Now copy_strings() calls this and I'm wondering we should implement or
> not.  It seems the kernel works fine for me without the API...
 
Do you use a cpu with dcache aliasing issue ?

> Do you have any problem due to luck of the API?

No, but looking at copy_strings(), I think we can have some trouble.

BTW, do you recall flush_anon_page() and fuse bug ? It seems the same
here...

                Franck

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