Subject: Re: Splitting struct device and softc
To: None <>
From: Joerg Sonnenberger <>
List: tech-kern
Date: 09/23/2007 17:50:10
On Sun, Sep 23, 2007 at 08:41:46AM -0700, Matt Thomas wrote:
> On Sep 23, 2007, at 8:21 AM, Joerg Sonnenberger wrote:
>> Hi all,
>> I'd like to commit the attached patch to allow converting drivers on a
>> case-by-case base to not depend on struct device being the first field.
>> if_bge is included as sample. CFATTACH_DECL*_NEW is meant as a temporary
>> interface until all drivers are converted and should be removed after
>> that. This is a first and critical step to completely remove the public
>> definition of struct device (and make it an abstract interface thereby).
>> Joerg
>> <softc-sep.diff>
> Shouldn't devices be allocated from their own pool rather than be
> malloced?

Can we revisit this when the compat code is not needed any more? I guess
the answer depends quite a bit on how large struct device is and
therefore how big the overhead of malloc vs pool is. I also believe that
it is certainly not performance critical, so space usage is more
important here.