kernel - Add missing vm_page_wakeup()
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 4 Feb 2011 19:51:26 +0000 (11:51 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 4 Feb 2011 19:51:26 +0000 (11:51 -0800)
* Fix a long-standing issue where a VM page is improperly left PG_BUSY
  when vm_page_try_to_cache() races the Modified bit in underlying PTEs.

* This could only occur during periods of severe memory pressure and
  would typically lead to a program getting stuck in "pgtblk".

Reported-by: Peter Avalos <peter@theshell.com>
sys/vm/vm_page.c

index 95ceff1..283afd5 100644 (file)
@@ -1380,6 +1380,7 @@ vm_page_try_to_cache(vm_page_t m)
        vm_page_busy(m);
        vm_page_test_dirty(m);
        if (m->dirty) {
+               vm_page_wakeup(m);
                lwkt_reltoken(&vm_token);
                return(0);
        }