find_candidate() only calls try_to_free_buffer() if the buffer size
doesn't match what it's looking for. Therefore it won't release the
buffer pages allocated by the previous grow_buffers().
However, if two tasks were simultaneously using refill_freelist to get
different sizes of buffers, they could end up releasing each other's
newly added buffers.
> Does any body know a simple fix for find_candidate() in the
> new buffer code to avoid this behaviour?
Glad you asked :-) I've found some bugs in refill_freelist() that could
explain the oopses people have been reporting. I'm working on a patch
and will post it later (hopefully today.)
-Bill