[Top] [All Lists]

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

To: "Steven J. Hill" <>
Subject: Re: [PATCH V2 1/3] MIPS: Fix cache flushing for swap pages with non-DMA I/O.
From: Kevin Cernekee <>
Date: Fri, 20 Feb 2015 11:17:58 -0800
Cc:, Linux MIPS Mailing List <>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=Pz0CO5ddajunZrIoVi/xVhMMfkSMeyoFl6xYYSmeVBw=; b=YWRBeeYeAEKiV8Q447cql+PsCHdipoXuwHT9xFrb9Xq6NLDXJpKrmW4EZRIMVBwNz/ tIQef/5VXrOMSw09nlckroa/SgmsQPzX2XDdQbQ/23E31JegISwHH2Arh+Uv0TYJOBdS i3l2ZWEiGAOxlUXSW52UOItF8hIP3ErniMFVg=
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: <> <>
On Thu, Feb 19, 2015 at 8:17 AM, Steven J. Hill <> wrote:
> From: Leonid Yegoshin <>
> Flush the D-cache before the page is given to a process
> as an executable (I-cache) page when the backing store
> is non-DMA I/O.
> Signed-off-by: Leonid Yegoshin <>
> Signed-off-by: Steven J. Hill <>

This patch seems to make several different changes to the cache
maintenance code all at once:

1) Add logic to handle virtually tagged D$ and perform extra flushes
on TLB updates

2) Add new write barriers betwen D$/I$ or D$/L2 flushes

3) Make __flush_anon_page() play nice with HIGHMEM on systems with cache aliases

and maybe a few more that I missed.

Would it be possible to split this out into individual commits, and
include more comprehensive changelogs for each one describing the
exact problem being solved?

Also, it would be helpful to clarify how this relates to the use of
swap (?) with a backing store that is non-DMA I/O.  Do you have an
example of a situation where the existing code broke?  A play-by-play
postmortem would make for interesting reading.

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