Swap on DECStation
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
Signature · 4 lines
Fehler eingestehen, Größe zeigen: Nehmt die Rechtschreibreform zurück!!! /* Jan-Benedict Glaw <[email protected]> -- +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)
Hi,
Quoted 4 lines · On 19-Oct-00 Jan-Benedict Glaw wrote:
- *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...
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 Sat Jul 1 17:25:21 2000 renamed from pgtable.h.orig Sat Jul 1 12:27:34 2000 +3 -4
@@ -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 protected]> for pointing this out.
Signature · 2 lines
Regards, Harald
Quoted 4 lines · Harald Koerfgen
--- snip ---
pgtable.h Sat Jul 1 17:25:21 2000 line 449
Quoted 10 lines
pgtable.h Sat Jul 1 17:25:21 2000 renamed from pgtable.h.orig Sat Jul 1 12:27:34 2000 +3
-3@@ -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) })
Reverting this breaks R4000. At least now I know how this did end up in CVS ...
Ralf