NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-evbmips/52501: erlite quickly fails to allocate memory and processes wedge



On 08/23/17 23:00, coypu%sdf.org@localhost wrote:
The following reply was made to PR port-evbmips/52501; it has been noted by GNATS.

From:coypu%sdf.org@localhost
To:gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: port-evbmips/52501: erlite quickly fails to allocate memory and
  processes wedge
Date: Wed, 23 Aug 2017 21:56:19 +0000

  Deleting this definition (suggested by nick) allows me to use all
  memory.
this definition make uvm_km_alloc try to allocate only from one freelist
  (0) while I have two.
--- sys/arch/mips/include/vmparam.h 2017-08-24 00:50:16.988961601 +0300
  +++ /home/fly/vmparam.h	2017-08-24 00:50:06.125860018 +0300
  @@ -208,8 +208,6 @@
   #endif
#ifdef _KERNEL
  -#define	UVM_KM_VMFREELIST	mips_poolpage_vmfreelist
  -extern int mips_poolpage_vmfreelist;
   #ifdef ENABLE_MIPS_16KB_PAGE
   extern vaddr_t mips_vm_maxuser_address;
   #endif
I guess this helps with being able to use all free memory as well?

If so this change is preferable because it at least tries to allocate pages (for DMA) from the best range, but falls back if there aren't any.


Nick

Index: sys/uvm/uvm_km.c
===================================================================
RCS file: /cvsroot/src/sys/uvm/uvm_km.c,v
retrieving revision 1.143
diff -u -p -r1.143 uvm_km.c
--- sys/uvm/uvm_km.c	1 Jun 2017 02:45:15 -0000	1.143
+++ sys/uvm/uvm_km.c	24 Aug 2017 20:45:18 -0000
@@ -663,7 +663,7 @@ uvm_km_alloc(struct vm_map *map, vsize_t
 
 		pg = uvm_pagealloc_strat(NULL, offset, NULL, pgaflags,
 #ifdef UVM_KM_VMFREELIST
-		   UVM_PGA_STRAT_ONLY, UVM_KM_VMFREELIST
+		   UVM_PGA_STRAT_FALLBACK, UVM_KM_VMFREELIST
 #else
 		   UVM_PGA_STRAT_NORMAL, 0
 #endif



Home | Main Index | Thread Index | Old Index