cvs commit: src/sys/kern subr_rman.c
Nate Lawson
nate at root.org
Thu Aug 5 12:56:54 PDT 2004
John Baldwin wrote:
> jhb 2004-08-05 15:48:18 UTC
>
> FreeBSD src repository
>
> Modified files:
> sys/kern subr_rman.c
> Log:
> Fix the code in rman that merges adjacent unallocated resources to use a
> better check for 'adjacent'. The old code assumed that if two resources
> were adjacent in the linked list that they were also adjacent range wise.
> This is not true when a resource manager has to manage disparate regions.
> For example, the current interrupt code on i386/amd64 will instruct
> irq_rman to manage two disjoint regions: 0-1 and 3-15 for the non-APIC
> case. If IRQs 1 and 3 were allocated and then released, the old code
> would coalesce across the 1 to 3 boundary because the resources were
> adjacent in the linked list thus adding 2 to the area of resources that
> irq_rman managed as a side effect. The fix adds extra checks so that
> adjacent unallocated resources are only merged with the resource being
> freed if the start and end values of the resources also match up. The
> patch also consolidates the checks for adjacent resources being allocated.
>
> Revision Changes Path
> 1.35 +12 -5 src/sys/kern/subr_rman.c
Thanks! I'm really glad you looked into this. We're starting to have
more "merge" cases for rman with ACPI management of IO ports/memory.
-Nate
More information about the cvs-src
mailing list