We certainly hope that nobody will reimplement the same function without
the __deprecated warning, especially for order < PAGE_ALLOC_COSTLY_ORDER
where there's no looping at a higher level. So perhaps the best
alternative is to implement the same _nofail() functions but do a
WARN_ON(get_order(size) > PAGE_ALLOC_COSTLY_ORDER) instead?
I think it's really sad that the caller can't know what the upper bounds
of its memory requirement are ahead of time or at least be able to
implement a memory freeing function when kmalloc() returns NULL.
--