Peter Holm has reported that a 5-hour test of this patch revealed no problems.
I defined a sysctl to create reservations with every 17th page allocated, and then to check for the availability of 16 pages on a 16 page boundary. Ten samples without this change:
cycles/break: 2769630
cycles/break: 2586584
cycles/break: 2585703
cycles/break: 2587762
cycles/break: 2585641
cycles/break: 2587068
cycles/break: 2586093
cycles/break: 2585840
cycles/break: 2587580
cycles/break: 2586152
Ten samples after this change:
cycles/break: 64131
cycles/break: 73229
cycles/break: 73250
cycles/break: 73211
cycles/break: 73175
cycles/break: 73325
cycles/break: 73113
cycles/break: 73166
cycles/break: 73115
cycles/break: 73212
The patch that implements the sysctl is here.{F4661598}