[Top] [All Lists]

Re: [PATCH V2 1/3] MIPS: Fix cache flushing for swap pages with non-DMA

To: "Maciej W. Rozycki" <>
Subject: Re: [PATCH V2 1/3] MIPS: Fix cache flushing for swap pages with non-DMA I/O.
From: David Daney <>
Date: Tue, 24 Feb 2015 14:57:57 -0800
Cc: Leonid Yegoshin <>, Zenon Fortuna <>, "Steven J. Hill" <>, IMG - MIPS Linux Kernel developers <>, Linux MIPS Mailing List <>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=9KepSmF9evTJm+J2d2gKkBXjgbRjQB49G1zih4W7JmU=; b=rxo0bmhAPT89/koCtsVU9/GZt9GUud1+fDaTcZ+jlRsD0UVBXym4tOabp4PhYSoNgd DNDFjmUkQmhCxImHZ/VIJcVOwTe+ymr4uBLzJ3TpyrAZK4k8Mq1r/rTnstwKetH3KTN0 WBefw3ouQKPLrjLDHwYuYERuSVrV26j7lplXQw4U/pTOUnyIIXELRIwoQdYHZ/8msyx6 mI+KTI7/4oaB/H4oWOqJT6xGIH1RFZV5FUKMGgaRfmmd2KzH/7WV3lwhby9eWHUw/ZxC zRg9iw+kA6PtX35H4wXT6+WPid0roOxU66/FVovJPgW6OlcQp+egkOduyEK34qlZUgIq DXbw==
In-reply-to: <>
List-archive: <>
List-help: <>
List-id: linux-mips <>
List-owner: <>
List-post: <>
List-software: Ecartis version 1.0.0
List-subscribe: <>
List-unsubscribe: <>
Original-recipient: rfc822;
References: <> <> <> <> <> <> <> <> <> <>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7
On 02/24/2015 02:50 PM, Maciej W. Rozycki wrote:
On Tue, 24 Feb 2015, Leonid Yegoshin wrote:

   For simplicity perhaps on SMP we should just always use hit operations
regardless of the size requested.

High performance folks may not like doing a lot of stuff for 8MB VMA release
instead of flushing 64KB.

  What kind of a use case is that, what does it do?

Especially taking into account TLB exceptions and postprocessing in
fixup_exception() for swapped-out/not-yet-loaded-ELF blocks.

  The normal use for cacheflush(2) I know of is for self-modifying or other
run-time-generated code, to synchronise caches after a block of machine
code has been patched in -- SYNCI can also be used for that purpose these

SYNCI is only useful in non-SMP kernels.

If a thread is migrated to a different CPU between the SYNCI, and the attempt to execute the freshly generated code, the new CPU can still have a dirty ICACHE. So for Linux userspace, cacheflush(2) is your only option.

David Daney

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