That's effectively what the implementation I posted is doing.
Simple math ... as soon as you get the right "logical page",
and that page size could become a per-pool tunable. Currently
one logical page is PAGE_SIZE; there are some issues to
deal with in terms of not crossing page boundaries.
There can be multiple such pages, known to the pool allocator
and hidden from the device drivers. I'd expect most USB host
controllers wouldn't allocate more than one or two pages, so
the cost of this function would typically be small.
- Dave
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
->