From: "David S. Miller" <davem@davemloft.net>
To: Christoph Lameter <clameter@sgi.com>
Cc: davidm@hpl.hp.com, ak@muc.de, clameter@sgi.com,
vda@port.imtp.ilyichevsk.odessa.ua, haveblue@us.ibm.com,
akpm@osdl.org, linux-kernel@vger.kernel.org, mel@csn.ul.ie,
linux-ia64@vger.kernel.org, Jens.Maurer@gmx.net
Subject: Re: [PATCH] add a clear_pages function to clear pages of higher
Date: Fri, 25 Mar 2005 02:29:16 +0000 [thread overview]
Message-ID: <20050324182916.661934df.davem@davemloft.net> (raw)
In-Reply-To: <Pine.LNX.4.58.0503241449070.7119@schroedinger.engr.sgi.com>
On Thu, 24 Mar 2005 14:49:55 -0800 (PST)
Christoph Lameter <clameter@engr.sgi.com> wrote:
> Could you help me fix up this patch replacing the old clear_pages patch?
Ok, first you need to mark the order and gfp arguments as unsigned
for mm/page_alloc.c:prep_zero_page() so that it matches the prototype
you added to include/linux/gfp.h else the compiler warns a lot.
Next, in the same function in mm/page_alloc.c, "PageHighmem()" is typo'd, it should be
"PageHighMem()".
The clear_cold() call on the next line needs a semicolon.
Erm... were any of your test builds done with the new CONFIG_CLEAR_COLD
option enabled? :-)
Next, replace your arch/sparc64/lib/clear_page.S diff with this one and
things would be working and we'll be using the proper temporal vs.
non-temporal stores on that platform.
=== arch/sparc64/lib/clear_page.S 1.1 vs edited ==--- 1.1/arch/sparc64/lib/clear_page.S 2004-08-08 19:54:07 -07:00
+++ edited/arch/sparc64/lib/clear_page.S 2005-03-24 15:56:33 -08:00
@@ -72,26 +72,34 @@
mov 1, %o4
clear_page_common:
- VISEntryHalf
membar #StoreLoad | #StoreStore | #LoadStore
- fzero %f0
sethi %hi(PAGE_SIZE/64), %o1
mov %o0, %g1 ! remember vaddr for tlbflush
- fzero %f2
or %o1, %lo(PAGE_SIZE/64), %o1
- faddd %f0, %f2, %f4
- fmuld %f0, %f2, %f6
- faddd %f0, %f2, %f8
- fmuld %f0, %f2, %f10
- faddd %f0, %f2, %f12
- fmuld %f0, %f2, %f14
-1: stda %f0, [%o0 + %g0] ASI_BLK_P
+#define PREFETCH(x, y) prefetch x, y
+#define PREFETCH_CODE 2
+
+ PREFETCH([%o0 + 0x000], PREFETCH_CODE)
+ PREFETCH([%o0 + 0x040], PREFETCH_CODE)
+ PREFETCH([%o0 + 0x080], PREFETCH_CODE)
+ PREFETCH([%o0 + 0x0c0], PREFETCH_CODE)
+ PREFETCH([%o0 + 0x100], PREFETCH_CODE)
+ PREFETCH([%o0 + 0x140], PREFETCH_CODE)
+ PREFETCH([%o0 + 0x180], PREFETCH_CODE)
+1:
+ stx %g0, [%o0 + 0x00]
+ stx %g0, [%o0 + 0x08]
+ stx %g0, [%o0 + 0x10]
+ stx %g0, [%o0 + 0x18]
+ stx %g0, [%o0 + 0x20]
+ stx %g0, [%o0 + 0x28]
+ stx %g0, [%o0 + 0x30]
+ stx %g0, [%o0 + 0x38]
+ PREFETCH([%o0 + 0x1c0], PREFETCH_CODE)
subcc %o1, 1, %o1
bne,pt %icc, 1b
add %o0, 0x40, %o0
- membar #Sync
- VISExitHalf
brz,pn %o4, out
nop
@@ -101,5 +109,32 @@
stw %o2, [%g6 + TI_PRE_COUNT]
out: retl
+ nop
+
+ .globl clear_cold
+clear_cold: /* %o0Þst, %o1=order */
+ sethi %hi(PAGE_SIZE/64), %o2
+ clr %o4
+ or %o2, %lo(PAGE_SIZE/64), %o2
+ sllx %o2, %o1, %o1
+ VISEntryHalf
+ membar #StoreLoad | #StoreStore | #LoadStore
+ fzero %f0
+ fzero %f2
+ faddd %f0, %f2, %f4
+ fmuld %f0, %f2, %f6
+ faddd %f0, %f2, %f8
+ fmuld %f0, %f2, %f10
+
+ faddd %f0, %f2, %f12
+ fmuld %f0, %f2, %f14
+2: stda %f0, [%o0 + %g0] ASI_BLK_P
+ subcc %o1, 1, %o1
+ bne,pt %icc, 2b
+ add %o0, 0x40, %o0
+ membar #Sync
+ VISExitHalf
+
+ retl
nop
next prev parent reply other threads:[~2005-03-25 2:29 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.58.0503101229420.13911@schroedinger.engr.sgi.com>
[not found] ` <1110490683.24355.17.camel@localhost>
[not found] ` <Pine.LNX.4.58.0503101702120.15940@schroedinger.engr.sgi.com>
[not found] ` <200503111008.12134.vda@port.imtp.ilyichevsk.odessa.ua>
2005-03-17 1:33 ` [PATCH] add a clear_pages function to clear pages of higher Christoph Lameter
2005-03-18 9:54 ` [PATCH] add a clear_pages function to clear pages of higher order Denis Vlasenko
2005-03-18 15:00 ` [PATCH] add a clear_pages function to clear pages of higher Christoph Lameter
2005-03-18 19:28 ` [PATCH] add a clear_pages function to clear pages of higher order Andi Kleen
2005-03-18 20:19 ` [PATCH] add a clear_pages function to clear pages of higher Christoph Lameter
2005-03-20 0:20 ` [PATCH] add a clear_pages function to clear pages of higher order Denis Vlasenko
2005-03-24 18:34 ` David Mosberger
2005-03-24 18:41 ` [PATCH] add a clear_pages function to clear pages of higher Christoph Lameter
2005-03-24 19:03 ` David S. Miller
2005-03-24 22:49 ` Christoph Lameter
2005-03-24 23:13 ` David S. Miller
2005-03-25 2:29 ` David S. Miller [this message]
2005-03-25 2:43 ` Christoph Lameter
2005-03-27 17:12 ` [PATCH] add a clear_pages function to clear pages of higher order Andi Kleen
2005-03-27 18:23 ` [PATCH] add a clear_pages function to clear pages of higher David S. Miller
2005-03-29 1:58 ` Christoph Lameter
2005-04-06 0:15 ` Christoph Lameter
2005-04-06 0:23 ` David Mosberger
2005-04-06 0:33 ` Christoph Lameter
2005-04-06 4:48 ` David Mosberger
2005-04-06 5:15 ` [PATCH] add a clear_pages function to clear pages of higher order Gerrit Huizenga
2005-04-06 16:03 ` Grant Grundler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050324182916.661934df.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=Jens.Maurer@gmx.net \
--cc=ak@muc.de \
--cc=akpm@osdl.org \
--cc=clameter@sgi.com \
--cc=davidm@hpl.hp.com \
--cc=haveblue@us.ibm.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mel@csn.ul.ie \
--cc=vda@port.imtp.ilyichevsk.odessa.ua \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox