Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 05 Aug 2004 12:56:52 -0700
From:      Nate Lawson <nate@root.org>
To:        John Baldwin <jhb@FreeBSD.org>, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern subr_rman.c
Message-ID:  <41129104.30207@root.org>
In-Reply-To: <20040805154821.C9E3F16A541@hub.freebsd.org>
References:  <20040805154821.C9E3F16A541@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41129104.30207>