On 07/12/2012 07:26, John Baldwin wrote:
[ Adding alc@ for VM stuff, Warner for arm/mips bus dma brokenness ]

When the code underlying contigmalloc() fails in its initial attempt to allocate memory and proceeds to launder and reclaim pages, it should almost certainly do as the page daemon does and invoke the vm_lowmem handlers. In particular, this should coax the ZFS ARC into releasing some of its hoard of wired memory. Try this:

Index: vm/vm_contig.c
===================================================================
--- vm/vm_contig.c      (revision 238372)
+++ vm/vm_contig.c      (working copy)
@@ -192,6 +192,18 @@ vm_contig_grow_cache(int tries, vm_paddr_t low, vm
 {
        int actl, actmax, inactl, inactmax;

+       if (tries > 0) {
+               /*
+                * Decrease registered cache sizes.
+                */
+               EVENTHANDLER_INVOKE(vm_lowmem, 0);
+
+               /*
+                * We do this explicitly after the caches have been drained
+                * above.
+                */
+               uma_reclaim();
+       }
        vm_page_lock_queues();
        inactl = 0;
        inactmax = tries < 1 ? 0 : cnt.v_inactive_count;


_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[email protected]"

Reply via email to