Subject: Swap on DECStation

From: Jan-Benedict Glaw <[email-masked]>
Date: Thu, 19 Oct 2000 12:14:32 +0200

Hi!

Making my first steps on DECStations, I see the follwoing behavior:

- Running juite a number of processes like
        void main(void){for(;;);}
 is no real problem. They don't want any memory;)

- *But* only running two processes which malloc() a large memory
  region (read: 10MB each on my 5000/120 w/ 8MB RAM *but* enough
  swap to provide that virtual memory) will lock up the box quite
  predictably...

Is there any advice you can give me on how to start debugging the
process of swapping in/out pages? I really don't know enough about
Linux' VM system and it's arch-dependand backend on MIPSel.

MfG, JBG

-- 
Fehler eingestehen, Größe zeigen: Nehmt die Rechtschreibreform zurück!!!
/* Jan-Benedict Glaw <[email-masked]> -- +49-177-5601720 */
keyID=0x8399E1BB fingerprint=250D 3BCF 7127 0D8C A444 A961 1DBD 5E75 8399 E1BB
     "insmod vi.o and there we go..." (Alexander Viro on linux-kernel)

---

From: Harald Koerfgen <[email-masked]>
Date: Thu, 19 Oct 2000 20:55:54 +0200 (CEST)

Hi,

>   swap to provide that virtual memory) will lock up the box quite

Yes, swapping is broken on R23000 boxen since quite some time and I haven't had the time
to track this down. However, reverting a change in include/asmmips/pgtable.h seems to
help:

--- snip ---
--- pgtable.h.orig      Sat Jul  1 12:27:34 2000
+++ pgtable.h   Sat Jul  1 17:25:21 2000
@@ -443,9 +443,9 @@
 extern void update_mmu_cache(struct vm_area_struct *vma,
                                unsigned long address, pte_t pte);
 
-#define SWP_TYPE(x)            (((x).val >> 1) & 0x3f)
-#define SWP_OFFSET(x)          ((x).val >> 8)
-#define SWP_ENTRY(type,offset) ((swp_entry_t) { ((type) << 1) | ((offset) << 8) })
+#define SWP_TYPE(x)            (((x).val >> 8) & 0x7f)
+#define SWP_OFFSET(x)          ((x).val >> 15)
+#define SWP_ENTRY(type,offset) ((swp_entry_t) { ((type) << 8) | ((offset) << 15) })
 #define pte_to_swp_entry(pte)  ((swp_entry_t) { pte_val(pte) })
--- snip ---

Thanks to Richard van den Berg <[email-masked]> for pointing this out.

-- 
Regards,
Harald

---

From: Ralf Baechle <[email-masked]>
Date: Thu, 19 Oct 2000 23:44:30 +0200

> +++ pgtable.h   Sat Jul  1 17:25:21 2000

Reverting this breaks R4000.  At least now I know how this did end up in
CVS ...

  Ralf