Re: More general resource allocation scheme: a patch to look at

David Hinds (dhinds@lahmed.Stanford.EDU)
Fri, 18 Jun 1999 17:39:17 -0700


On Sat, Jun 19, 1999 at 01:02:10AM +0200, Martin Mares wrote:

> Philosophically speaking, loading and unloading a driver should leave
> the system in the same state as before.

I mostly agree with you, that this should be our desired end point.
However, if loading a driver gives us information about persistent
system state (i.e., the presence of hardware) that other drivers can
take advantage of, I see no reason to go out of our way to discard
that information.

> I don't understand this argument -- the user either has all the drivers
> loaded (and then there is no difference between your and my approach)
> or he doesn't, but then the hot plug behaviour is not consistent at all,
> since collisions sometimes occur and sometimes not, depending on the
> exact order of driver loadings.

I agree with you to the extent that I think we are arguing about
corner cases that no one really cares about, and the more I think
about it, the less I care, too. My way of doing it has exactly two
advantages: (1) we can avoid some resource collisions that are
currently not detected but could be, with no driver updates, and (2)
by making allocation imply that a region is occupied, I didn't need to
enlarge the resource entry structure to include an "occupied" flag,
which satisfied my frugal tendencies.

-- Dave

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/