Re: per cpun+ spin locks coexistence?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Dipankar Sarma
Date: Tuesday, March 18, 2008 - 10:34 am

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
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
per cpun+ spin locks coexistence?, Peter Teoh, (Wed Mar 12, 9:17 am)
Re: per cpun+ spin locks coexistence?, Jeremy Fitzhardinge, (Fri Mar 14, 10:54 am)
Re: per cpun+ spin locks coexistence?, Peter Teoh, (Sun Mar 16, 9:30 am)
Re: per cpun+ spin locks coexistence?, Johannes Weiner, (Sun Mar 16, 1:20 pm)
Re: per cpun+ spin locks coexistence?, Peter Teoh, (Mon Mar 17, 10:06 am)
Re: per cpun+ spin locks coexistence?, Johannes Weiner, (Mon Mar 17, 10:51 am)
Re: per cpun+ spin locks coexistence?, Eric Dumazet, (Mon Mar 17, 12:22 pm)
Re: per cpun+ spin locks coexistence?, Peter Teoh, (Tue Mar 18, 10:00 am)
Re: per cpun+ spin locks coexistence?, Dipankar Sarma, (Tue Mar 18, 10:34 am)
Re: per cpun+ spin locks coexistence?, Eric Dumazet, (Tue Mar 18, 11:00 am)
Re: per cpun+ spin locks coexistence?, Peter Teoh, (Wed Mar 19, 9:25 am)