That makes sense. I'll add those additional CONFIG vars to the v3 patch. I don't see a use case for alignments above 4K for RAW buffers so that's a reasonable upper limit, however I suspect some implementations may have problems with that. If a platform has a HW buffer manager that uses 512 byte blocks, they are going to be 512-byte aligned and it's meaningless to try to ask for a higher alignment.
On Tue, Dec 9, 2014 at 6:54 AM, Savolainen, Petri (NSN - FI/Espoo) < [email protected]> wrote: > > > > > *From:* [email protected] [mailto: > [email protected]] *On Behalf Of *ext Bill Fischofer > *Sent:* Tuesday, December 09, 2014 1:08 PM > *To:* lng-odp-forward > *Subject:* [lng-odp] Alignment question > > > > A number of APIs support a buf_align parameter but we haven't been > terribly precise about limits on this, so some questions for Petri. > > > > I think only buffer_pool_create has alignment parameter. > > > > With buf_align being defined as uint32_t in theory we can specify > alignments up to 2GB. > > > > 1. MAY implementations impose a lower upper limit on the alignments they > support? > > > > ODP_CONFIG_BUFFER_ALIGN_MAX (4*1024) ? > > > > > > 2. If so, what is the minimum acceptable upper alignment limit? We've > specified that buffers MUST be at minimum 8 byte aligned but is that > sufficient? > > > > ODP_CONFIG_BUFFER_ALIGN_MIN 8 ? > > > > 3. If implementations MAY impose an upper alignment limit below 2GB, what > SHOULD happen if an application requests an alignment above this limit? > Fail the request? Saturate at the implementation-defined max alignment? > > > > It should fail. User requests minimum alignment, implementation can round > up. > > > > -Petri > > >
_______________________________________________ lng-odp mailing list [email protected] http://lists.linaro.org/mailman/listinfo/lng-odp
