(in)appropriate uses for MAXBSIZE
Scott Long
scottl at samsco.org
Fri Apr 9 14:35:22 UTC 2010
On Apr 9, 2010, at 8:29 AM, Andriy Gapon wrote:
> on 09/04/2010 16:52 Scott Long said the following:
>>
>> Storage drivers are insulated from the details of MAXBSIZE by GEOM honoring
>> the driver's advertised max-i/o-size attribute. What I see when I grep through the
>> sources are mostly uses in busdma attributes, which themselves probably came
>> via cut-n-paste from prior drivers. I can't come up with any explanation for that
>> which makes good design sense, so I'll agree that storage drivers shouldn't
>> reference MAXBSIZE.
>
> Should DFLTPHYS be used there?
> Or is there a better DMA-specific constant?
> Or, perhaps, each driver should just use its won private constant based on its
> hardware capabilities?
Each driver should be advertising its own maxio attribute, with the exception
of CAM drivers. Advertising is optional in CAM, and is defaulted to 64k. But
yes, each driver should define and use its own constants here.
Scott
More information about the freebsd-arch
mailing list