Author: markj
Date: Thu Jun 23 19:24:38 2016
New Revision: 302147
URL: https://svnweb.freebsd.org/changeset/base/302147

Log:
  Use M_NOWAIT when allocating memory for the ACPI wakeup handler.
  
  If the allocation attempt fails, we may otherwise VM_WAIT after a failed
  attempt to reclaim contiguous memory in the requested range. After r297466,
  this results in the thread going to sleep, causing a hang during boot.
  
  Reviewed by:  jkim, kib
  Approved by:  re (gjb)
  Sponsored by: EMC / Isilon Storage Division
  Differential Revision:        https://reviews.freebsd.org/D6945

Modified:
  head/sys/x86/acpica/acpi_wakeup.c

Modified: head/sys/x86/acpica/acpi_wakeup.c
==============================================================================
--- head/sys/x86/acpica/acpi_wakeup.c   Thu Jun 23 19:19:44 2016        
(r302146)
+++ head/sys/x86/acpica/acpi_wakeup.c   Thu Jun 23 19:24:38 2016        
(r302147)
@@ -322,7 +322,7 @@ acpi_alloc_wakeup_handler(void)
         * page-aligned.
         */
        wakeaddr = contigmalloc((ACPI_PAGETABLES + 1) * PAGE_SIZE, M_DEVBUF,
-           M_WAITOK, 0x500, 0xa0000, PAGE_SIZE, 0ul);
+           M_NOWAIT, 0x500, 0xa0000, PAGE_SIZE, 0ul);
        if (wakeaddr == NULL) {
                printf("%s: can't alloc wake memory\n", __func__);
                return (NULL);
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to