On Mon, 2008-09-15 at 14:52 -0400, Oren Laadan wrote:
...
OK, that's fair enough. But, can we document it as such? "Only headers
and things of known, static sizes can go in here. We don't use
kmalloc() instead of this because..."
Yes, it does mean that there is a bug because someone either made a
structure bigger, PAGE_SIZE smaller, or a call path got deeper than we
expected. I'm just having visions of the email hitting my inbox in 18
months. :)
The structures are sized consistently across all architectures and
configurations. However, PAGE_SIZE and the size of that buffer are not.
The buffer will be 8k on x86, but 128k on most ppc64 configurations.
Can we at least make it sized in numbers of bytes rather than pages?
Also, please remember that using kmalloc() buys you lots of fun stuff on
top of get_free_pages(), like redzones and easier debugging.
-- Dave
--