kern/120515: acpi_alloc_wakeup_handler: can't alloc wake memory

Arthur Hartwig arthur.hartwig at nokia.com
Mon Feb 11 01:40:02 UTC 2008


>Number:         120515
>Category:       kern
>Synopsis:       acpi_alloc_wakeup_handler: can't alloc wake memory
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 11 01:40:02 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Arthur Hartwig
>Release:        6.3
>Organization:
Nokia
>Environment:
>Description:
The following message appears during startup:

acpi_alloc_wakeup_handler: can't alloc wake memory

Investigation shows the problem to be that there is no free memory with sufficiently low physical address.

(This message has not been seen during startup of a generic kernel but Nokia has applied a number of tweaks to significantly increase the kernel virtual address including setting KERNBASE to 0x60000000).


>How-To-Repeat:

>Fix:
In vm/vm_page.c function vm_page_startup()loops over the available memory blocks in order of increasing address calling vm_pageq_add_new_page(pa)which calls vm_pageq_enqueue() which adds the page to the tail of the appropriate vm_pages_queue queue. Thus on return from vm_page_startup() the vm_pages_queue queues are ordered by increasing physical address. Removal from these queues is from the queue head so the pages with lowest physical address are allocated first.

The following change steps through the available memory blocks in order of decreasing physical address (allocating pages to the queues in order of increasing address) thus relegating the pages with low physical address to the end of the queues and increasing the likelihood that suitable pages will be found to meet the request of acpi_alloc_wakeup_handler().

*** 329,342 ****

        /*
         * Construct the free queue(s) in descending order (by physical
!        * address) so that the first 16MB of physical memory is allocated
         * last rather than first.  On large-memory machines, this avoids
         * the exhaustion of low physical memory before isa_dma_init has run.
         */
        cnt.v_page_count = 0;
        cnt.v_free_count = 0;
        list = getenv("vm.blacklist");
!       for (i = 0; phys_avail[i + 1] && npages > 0; i += 2) {
                pa = phys_avail[i];
                last_pa = phys_avail[i + 1];
                while (pa < last_pa && npages-- > 0) {
--- 330,344 ----

        /*
         * Construct the free queue(s) in descending order (by physical
!        * address) of base address of memory block so that the first
!        * 16MB of physical memory is allocated
         * last rather than first.  On large-memory machines, this avoids
         * the exhaustion of low physical memory before isa_dma_init has run.
         */
        cnt.v_page_count = 0;
        cnt.v_free_count = 0;
        list = getenv("vm.blacklist");
!       for (i = nblocks*2-2; i >= 0 && npages > 0; i -= 2) {
                pa = phys_avail[i];
                last_pa = phys_avail[i + 1];
                while (pa < last_pa && npages-- > 0) {


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list