Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* [patch] L1_CACHE_BYTES on ev6 (2.4.0x)
@ 2000-07-31 16:09 Ivan Kokshaysky
  2000-08-01 12:42 ` Martin Frey
  2000-08-10  1:54 ` [patch] write hint for clearing pages werner
  0 siblings, 2 replies; 4+ messages in thread
From: Ivan Kokshaysky @ 2000-07-31 16:09 UTC (permalink / raw)
  To: axp-list; +Cc: linux-alpha

Currently L1_CACHE_BYTES is defined as 32 for ev6. Increasing this
to 64 (as it should be) broke networking.
Most probably the reason is in the entry.S:
ret_from_sys_call:
	cmovne	$26,0,$19		/* $19 = 0 => non-restartable */
	ldl	$3,TASK_PROCESSOR($8)
	lda	$4,softirq_state
	sll	$3,5,$3
	^^^^^^^^^^^^^^^
	addq	$3,$4,$4
	ldq	$4,0($4)
	...
sizeof(struct softirq_state) hardcoded to 32 here, although 
it depends on SMP_CACHE_BYTES (see include/linux/interrupt.h).
Could someone try this patch on ev6 SMP boxes?

Ivan.


diff -ur 2.4.0t5/arch/alpha/kernel/entry.S linux/arch/alpha/kernel/entry.S
--- 2.4.0t5/arch/alpha/kernel/entry.S	Tue Jul 25 09:46:40 2000
+++ linux/arch/alpha/kernel/entry.S	Mon Jul 31 17:40:30 2000
@@ -6,6 +6,7 @@
 
 #include <linux/config.h>
 #include <asm/system.h>
+#include <asm/cache.h>
 
 #define SIGCHLD 20
 
@@ -577,7 +578,7 @@
 	cmovne	$26,0,$19		/* $19 = 0 => non-restartable */
 	ldl	$3,TASK_PROCESSOR($8)
 	lda	$4,softirq_state
-	sll	$3,5,$3
+	sll	$3,L1_CACHE_SHIFT,$3
 	addq	$3,$4,$4
 	ldq	$4,0($4)
 	sll	$4,32,$3
diff -ur 2.4.0t5/include/asm-alpha/cache.h linux/include/asm-alpha/cache.h
--- 2.4.0t5/include/asm-alpha/cache.h	Thu Jun 22 09:30:59 2000
+++ linux/include/asm-alpha/cache.h	Mon Jul 31 17:51:11 2000
@@ -8,12 +8,14 @@
 
 /* Bytes per L1 (data) cache line. */
 #if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_EV6)
-# define L1_CACHE_BYTES     32	/* should be 64, but networking dies */
+# define L1_CACHE_BYTES     64
+# define L1_CACHE_SHIFT     6
 #else
 /* Both EV4 and EV5 are write-through, read-allocate,
    direct-mapped, physical.
 */
 # define L1_CACHE_BYTES     32
+# define L1_CACHE_SHIFT     5
 #endif
 
 #define L1_CACHE_ALIGN(x)  (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch] L1_CACHE_BYTES on ev6 (2.4.0x)
  2000-07-31 16:09 [patch] L1_CACHE_BYTES on ev6 (2.4.0x) Ivan Kokshaysky
@ 2000-08-01 12:42 ` Martin Frey
  2000-08-01 14:04   ` Ivan Kokshaysky
  2000-08-10  1:54 ` [patch] write hint for clearing pages werner
  1 sibling, 1 reply; 4+ messages in thread
From: Martin Frey @ 2000-08-01 12:42 UTC (permalink / raw)
  To: axp-list; +Cc: linux-alpha

Ivan Kokshaysky wrote:
> 
> Currently L1_CACHE_BYTES is defined as 32 for ev6. Increasing this
> to 64 (as it should be) broke networking.
<snip>
> Could someone try this patch on ev6 SMP boxes?
> 

Ivan,

I just patched a freshed 2.4.0-test5 and booted an
ES40 with 4 CPUs with it. The server is diskless,
all filesystems come from an NFS server. I recompiled
the kernel on the NFS volume, so networking seems
to work.
Are there any specific tests that could help?

Martin
-- 
Supercomputing Systems AG        email: frey@scs.ch	
Martin Frey                      www:   http://www.scs.ch/~frey
Technoparkstrasse 1		 phone: +41 (0)1 445 16 00
CH-8005 Zurich			 fax:	+41 (0)1 445 16 10


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch] L1_CACHE_BYTES on ev6 (2.4.0x)
  2000-08-01 12:42 ` Martin Frey
@ 2000-08-01 14:04   ` Ivan Kokshaysky
  0 siblings, 0 replies; 4+ messages in thread
From: Ivan Kokshaysky @ 2000-08-01 14:04 UTC (permalink / raw)
  To: axp-list; +Cc: linux-alpha

On Tue, Aug 01, 2000 at 02:42:30PM +0200, Martin Frey wrote:
> I just patched a freshed 2.4.0-test5 and booted an
> ES40 with 4 CPUs with it. The server is diskless,
> all filesystems come from an NFS server. I recompiled
> the kernel on the NFS volume, so networking seems
> to work.

Excellent. Thanks for testing.

> Are there any specific tests that could help?

No, thanks. 

Ivan.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [patch] write hint for clearing pages
  2000-07-31 16:09 [patch] L1_CACHE_BYTES on ev6 (2.4.0x) Ivan Kokshaysky
  2000-08-01 12:42 ` Martin Frey
@ 2000-08-10  1:54 ` werner
  1 sibling, 0 replies; 4+ messages in thread
From: werner @ 2000-08-10  1:54 UTC (permalink / raw)
  To: axp-list

Another one liner which may also break networking :-)

linux-2.4.0-test5/include/asm-alpha/page.h

--- page.h.orig Wed Aug  9 18:48:41 2000
+++ page.h Wed Aug  9 18:48:16 2000
@@ -25,6 +25,7 @@
  unsigned long *ptr = (unsigned long *)page;

  do {
+  __asm__("wh64 (%0)" : "+r" (ptr));
   ptr[0] = 0;
   ptr[1] = 0;
   ptr[2] = 0;





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-08-10  1:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-07-31 16:09 [patch] L1_CACHE_BYTES on ev6 (2.4.0x) Ivan Kokshaysky
2000-08-01 12:42 ` Martin Frey
2000-08-01 14:04   ` Ivan Kokshaysky
2000-08-10  1:54 ` [patch] write hint for clearing pages werner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox