There's still the mempool.
We could perform a GFP_KERNEL replenishment of the ratnode mempool
after the page_cache_alloc(), and before taking any locks, if
that's needed.
> > Then again, Andi says that sizeof(struct page) is a problem for
> > x86-64.
>
> not true.
>
> > No recursion needed, no allocations needed.
>
> the 28 bytes if they're on the stack they're like recursion, just using
> an interactive algorithm.
>
> you're done with 28 bytes with a max 7/8 level tree, so 7*4 = 28 (4 size
> of pointer/long). On a 32bit arch the max index supported is
> 2^32, on a 64bit arch the max index supported is
> 2^(64-PAGE_CACHE_SHFIT), plus each pointer is 8 bytes. You may want to
> do the math to verify if you've enough stack to walk the tree in order,
> it's not obvious.
I make that 144 bytes of stack.
-
-
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/