From 251386b4b261f2fd90e4eb905d9f18288a2c80ff Mon Sep 17 00:00:00 2001 From: Maksim Yevmenkin Date: Wed, 23 May 2012 18:56:29 +0000 Subject: [PATCH] Tweak condition for disabling allocation from per-CPU buckets in low memory situation. I've observed a situation where per-CPU allocations were disabled while there were enough free cached pages. Basically, cnt.v_free_count was sitting stable at a value lower than cnt.v_free_min and that caused massive performance drop. Reviewed by: alc MFC after: 1 week --- sys/vm/uma_core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c index eaa2faf67612..5b83ec30e787 100644 --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -272,10 +272,7 @@ SYSCTL_PROC(_vm, OID_AUTO, zone_stats, CTLFLAG_RD|CTLTYPE_STRUCT, static void bucket_enable(void) { - if (cnt.v_free_count < cnt.v_free_min) - bucketdisable = 1; - else - bucketdisable = 0; + bucketdisable = vm_page_count_min(); } /*