Re: Shared memory not SMP safe to user-mode code.

Andrea Arcangeli (andrea@suse.de)
Tue, 30 Nov 1999 18:38:11 +0100 (CET)


On Tue, 30 Nov 1999, Richard B. Johnson wrote:

>The problem is not that deadlocks occasionally occur. The problem
>is that, on a SMP machine, what was written by one CPU does not
>appear in shared memory when viewed by another CPU. This is a bug.

The kernel can do nothing to serialize you. Attaching a shared memory
segment in memory from physical point of view is exactly as running SMP
threaded with clone. The difference is only in the amount of memory
that you share across the tasks.

You have the same physical page shared and writeable by lots of tasks at
the same time. So all tasks can read and write on the same page at the
same time.

Andrea

-
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/