On Wed, Mar 19, 2008 at 01:00:27AM +0800, Peter Teoh wrote:
Wrong. You cannot switch to another processor in schedule_work(),
it doesn't block. Just read the code.
The reason why I used a per-cpu fdtable_defer_list is that I
did not want to make it a global list of deferred fdtable
structures to be freed and then have to protect it by a global lock.
Every fdtable free would have had to take the same global lock
in that case and this would have resulted in scalability
issues (cacheline bouncing, lock contention). Instead,
I used a per-cpu list in essence creating finer-grain locking.
Two CPUs doing fdtable free operations simultaneously will
not contend for the same lock in this case. The fddef lock
is still required for the reasons Eric pointed out.
Wrong.
Thanks
Dipankar
--