RE: Cache coherency... and locking

From: Oliver Xymoron (oxymoron@waste.org)
Date: Fri Jul 21 2000 - 12:10:42 EST


On Fri, 21 Jul 2000, Linda Walsh wrote:

> Ug...first there is SMP safe and then NUMA safe?

NUMA is not necessarily cache coherent. Being coherent scales very poorly.
Until a port to a NUMA machine exists, it's probably best to ignore the
issue. Locking on NUMA will probably use some non-memory-based form of
messaging.
 
> How do we isolate problem areas now before they cause random effects
> on a NUMA port?

The things that need to be protected by locks and memory barriers on SMP
will likely still need protection on NUMA. The races are more or less the
same, the windows will just be wider.
 
> For example, I wanted to have a simple 1 int check for auditing to be
> on or off. That way even if auditing is compile in or as a module, it
> would still have minimal impact. But it sounds like that global would
> have to have locks around it to guarantee cache coherency. Suddenly
> that doesn't look like such a good performance improvement. A
> Per-process byte might be a better way to go, less contention though
> it sounds like I'd still have to lock even that.

I'm not sure what your auditing structure looks like but I think a lock of
some form is unavoidable. For instance, a child process may need to
propagate something to the parent's audit trail on exit, but the parent is
running on the other CPU. It's probably best to begin with a single audit
lock or even the big kernel lock for simplicity.

--
 "Love the dolphins," she advised him. "Write by W.A.S.T.E.." 

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Jul 23 2000 - 21:00:18 EST