linux-mips
[Top] [All Lists]

Anyone noticed that there are a lot of cache flushes after kunmap/kunmap

To: "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>
Subject: Anyone noticed that there are a lot of cache flushes after kunmap/kunmap_atomic is called?
From: David VomLehn <dvomlehn@cisco.com>
Date: Wed, 06 Aug 2008 19:09:57 -0700
Authentication-results: rtp-dkim-2; header.From=dvomlehn@cisco.com; dkim=pass ( sig from cisco.com/rtpdkim2001 verified; );
Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; l=1390; t=1218075002; x=1218939002; c=relaxed/simple; s=rtpdkim2001; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version; d=cisco.com; i=dvomlehn@cisco.com; z=From:=20David=20VomLehn=20<dvomlehn@cisco.com> |Subject:=20Anyone=20noticed=20that=20there=20are=20a=20lot =20of=20cache=20flushes=20after=20kunmap/kunmap_atomic=0A=20 is=20called? |Sender:=20 |To:=20=22linux-mips@linux-mips.org=22=20<linux-mips@linux- mips.org>; bh=NR4um0HgShbaVpa8cIkzGCo8j7OVzDPWzr9KJ+kmyDU=; b=xxn0K8LLtTip2Qpbd9QXnrum6JNI7Y1RzeGLbBfScZoyn1uzaGvBS5H9Iy rVR8xh+hbU5Arssh4NqqCSXMaioUMevK6ozYu7CyVMc8fbmKEMhAUXu3otvZ z63jSKxky9;
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
User-agent: Thunderbird 2.0.0.16 (Windows/20080708)
On the MIPS processor, cache flushing is done based on virtual addresses. However, in the Linux kernel, there are a lot of places where memory is mapped with kmap or kmap_atomic, then unmapped with the corresponding kunmap or kunmap_atomic and only *then* is the cache flushed. In other words, we only flush the cache after we have dropped the mapping of memory into a virtual address. I think this is generally wrong.

This may really only affect those of us who have enabled high memory, but it's pretty prevalent in kernel code. We noted this before, but have apparently just been bitten by it. Is it just me or is there a fairly widespread problem for processors that flush the cache using virtual addresses?




- - - - - Cisco - - - - - This e-mail and any attachments may contain information which is confidential, proprietary, privileged or otherwise protected by law. The information is solely intended for the named addressee (or a person responsible for delivering it to the addressee). If you are not the intended recipient of this message, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete it from your computer.


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