[Top] [All Lists]

Re: [PATCH] MIPS: lib: Optimize partial checksum ops using prefetching.

To: "Steven J. Hill" <>
Subject: Re: [PATCH] MIPS: lib: Optimize partial checksum ops using prefetching.
From: David Daney <>
Date: Tue, 21 Jan 2014 13:03:37 -0800
Cc: Ralf Baechle <>,
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=s+Bjp5UhLRCk1tCAzKKxpwGyWRQXIJuqxyXRtSSRqc0=; b=U5GjICaP5WTzwHadGAZxivfIeuTpnOdeOFy/hhNkGUm/p8prh2vQHR8rk+ZXI80zrl BSq+TkMsrC+RQG58KnT/0INSVa7DyAMibYNk8xh48b2TjkvWUHEUgnklKZRlSlPye7gV 6mCs2Q6Y0imQqolFlTyqaTRc7TlbkpqyZp9fIcbjdCQhlmGpY1ZxgPzxafaLhmMtOxeF t6C20BhuO3OKcj5PaSV4rfza6Q9JbAHBmCJRzBL39IewA+YgMXO0tZ9SHt7i0AocdAzW DvUbJnZrw+Vih0EZ8omgybPOUeO6ufaKOD8F+ZlUQIOsy6+hYvPpbpGs1Zg8XcoYayq+ 5iTw==
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 01/21/2014 12:58 PM, Steven J. Hill wrote:
On 01/21/2014 02:49 PM, Ralf Baechle wrote:
On Tue, Jan 21, 2014 at 10:18:42AM -0600, Steven J. Hill wrote:

From: Leonid Yegoshin <>

Use the PREF instruction to optimize partial checksum operations.

Prefetch operations may cause obscure bus error exceptions on some
such as Malta, for example, when prefetching beyond the end of memory.
It may also mean memory regions that are just undergoing a DMA transfer
are being brought back into cache.

This pretty much means that pref is only safe to use on cache-coherent

So, could we have:

    #define PREFSIZE   (1 << MIPS_L1_CACHE_SHIFT)

and then use the PREFSIZE value instead of the hardcoded value of 32?

See arch/mips/mm/page.c for code that tries to do something sensible with streaming prefetches.


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