Nick Piggin <nickpiggin@xxxxxxxxxxxx> wrote:
Apparently these (higher-order && !wait) come up mainly in networking
which is the thing I had in mind. *However* as I only have half of a
gigabit network (ie. 1 card), I haven't done any testing where it
really counts. I'm also seeing surprisingly few reports on lkml, so
perhaps it is me that needs the beating?
There have been few reports, and I believe that networking is getting
changed to reduce the amount of GFP_ATOMIC higher-order allocation
attempts.
There have been multiple instances in the past year or so where we've made
changes in there, the changes were not adequately tested and stuff broke in
subtle ways. We need to raise the bar a bit - clearly demonstrate that we
have a problem, and then demonstrate that the fix fixes it, then worry
about side-effects.
I don't see anything in your code which directly prevents the following
serious scenario:
a) Some random 0-order allocation causes a 4-order page to be split up,
taking the 4-order pool below threshold.
b) kswapd goes berzerk reclaiming 9000 pages to replenish the 4-order
pool even though we don't need it.
You have arith in there which kinda-sorta prevents it, but I don't see any
hard-and-fast protection. Or did I miss it?