[pnfs] [0/4] nfs41: rework slot allocation scheme
Benny Halevy
bhalevy at panasas.com
Fri Mar 14 06:51:44 EDT 2008
When debugging nfs41-2.6.25 I realized that we enter an infinite loop
in the rpc state machine when we rpc_sleep_on needlessly, always when
looking for a free slot, and we were waking the task up when the slot
was found. This used to work correctly in the 2.6.24 code base but now
it doesn't anymore. Also, it is wasteful as you need to put the
task to sleep only when no free slots are found, and you need to wake
it up only after slots were freed.
While fixing that, I also changed the free slot mechanism from a flag
on each slot that's set and clear via atomic bit operations to an
ordered free_list so to reduce the number of bus-locking ops we need
to do on average (with enough load it could be O(#slots) while
now it will be O(1)).
Plus, one extra bonus fix done along is correct maintenance of
the table's highest slot id which was always set to max_slots
and now it is maintained dynamically when slots are allocated and
freed.
Benny
More information about the pNFS
mailing list