From: Orran Y Krieger <okrieg@us...> - 2002-01-30 15:18:07
comments preceded by "----"
kiran@...@lists.sourceforge.net on 01/30/2002 03:48:39 AM
Sent by: lse-tech-admin@...
cc: LSE Tech <lse-tech@...>
Subject: Re: [Lse-tech] Nodeless MCS Lock Implementation
On Mon, Jan 28, 2002 at 06:02:04PM -0800, john stultz wrote:
> +static inline void nmcs_unlock(nmcslock_t* lock)
> + lock->flag = 0;
Wouldn't a barrier() be required after lock->flag = 0 ? or even a mb()???
How about publishing nmcs numbers for difft no of processors? (2, 4, 6, 8
more). Just want to see if this implementation has a near flat
similar to that of plain mcs locks :). Comparisons with varying lengths
critical sections would also be nice to look at.
While nmcs implementation seems to gaurantee FIFO ordering, spinning on
accesible memory location is compromised..(although not entirely?) ...might
not be good for NUMA (compared to plain mcs locks) ???
--- this is adding a constant overhead, i.e., a single spinner on the lock
variable, irrespective of the number of processors or the number of threads
waiting for it. Hence, scalability is fine. On a NUMA system, you get
some additional remote traffic, but remember that with unmodified MCS you
still have one operation on lock variable for each of lock and unlock, so
this is just adding a constant additional overhead.
Ravikiran G Thirumalai <kiran@...>
Linux Technology Center, IBM Software Labs,
Lse-tech mailing list