linux-mips
[Top] [All Lists]

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

To: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Subject: Re: [PATCH V2 1/3] MIPS: Fix cache flushing for swap pages with non-DMA I/O.
From: David Daney <ddaney.cavm@gmail.com>
Date: Tue, 24 Feb 2015 15:58:15 -0800
Cc: "Maciej W. Rozycki" <macro@linux-mips.org>, Zenon Fortuna <zenon.fortuna@imgtec.com>, "Steven J. Hill" <Steven.Hill@imgtec.com>, IMG - MIPS Linux Kernel developers <IMG-MIPSLinuxKerneldevelopers@imgtec.com>, Linux MIPS Mailing List <linux-mips@linux-mips.org>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=A6gfNQVOYbVIEo+DkRAb6wrmaM5TB3CB+FcB7MLfESk=; b=E9CDJ70GW5sMRGRZIHS0K3mKbH/GFRYwqrINtszxNFPjpVN3uHHPBWYY80SH4PyrzA P5OXgfrDp+hIc2A0309vUFWupUuNgZ/yIiaE0EprhHJDoTQnlpoxOWVXn/L/4ki3dbhI Y1RvUQZ4woYXGdwurXVJVhKuoWVrpj25EtIn9CSgvwe9FdNkXqbhR/gRjOmADoVVxU1E o32FQHHGLzDIuSWazZXiZzcIN2xgI1G0qVkrpXCFrqERIeNklI4k3Lu/IALYDt79DAuY 55ICqO3ZGBBsWNC29O1ry3o4XJQruGm9Tg4DVG3z/sF5N+Ib/vE+l0Vy7LuVD4MUWa1W SlTg==
In-reply-to: <54ED06F4.8020607@imgtec.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1424362664-30303-1-git-send-email-Steven.Hill@imgtec.com> <1424362664-30303-2-git-send-email-Steven.Hill@imgtec.com> <CAJiQ=7DMBznB5Ths0sAZORf2hgSQRuBoPF-7HGHhcHn0EajnWg@mail.gmail.com> <54EBCC38.7000702@imgtec.com> <54EBD023.8090706@imgtec.com> <alpine.LFD.2.11.1502240224500.17311@eddie.linux-mips.org> <54ECE7CE.4040407@imgtec.com> <alpine.LFD.2.11.1502242140220.17311@eddie.linux-mips.org> <54ECF3E6.9080606@imgtec.com> <alpine.LFD.2.11.1502242235160.17311@eddie.linux-mips.org> <54ED01F5.8040409@gmail.com> <54ED06F4.8020607@imgtec.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7
On 02/24/2015 03:19 PM, Leonid Yegoshin wrote:
On 02/24/2015 02:57 PM, David Daney wrote:
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
days,

SYNCI is only useful in non-SMP kernels.
Yes, until MIPS R6. I pressed hard on Arch team to change vague words in
SYNCI description and now (MIPS R6) it has words requiring execution on
all cores:

"SYNCI globalization:
Release 6: SYNCI globalization (as described below) is required:
compliant implementations must globalize SYNCI.
Portable software can rely on this behavior, and use SYNCI rather than
expensive “instruction cache shootdown”
using inter-processor interrupts."

Wow. I guess implementing -msynci wasn't a complete waste of time after all.

In any event, it is irrelevant with respect to the semantics of cacheflush(2), which still must be properly implemented.

David Daney




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