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

[ Available lists | Index of freebsd-bugs | Month of Feb 2008 | Week of 11 Feb 2008 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Arthur Hartwig <arthur.hartwig@nokia.com>
Date
11 Feb 2008 01:40:02
Subject
kern/120515: acpi_alloc_wakeup_handler: can't alloc wake memory
Message-ID
200802110133.m1B1XWtJ026120@www.freebsd.org


[ Hide this part ]
 
>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:


Elapsed time: 0.087 seconds