Re: [PATCH 1 of 8] Core of mmu notifiers

From: Christoph Lameter
Date: Wed Apr 02 2008 - 21:06:35 EST


Thinking about this adventurous locking some more: I think you are
misunderstanding what a seqlock is. It is *not* a spinlock.

The critical read section with the reading of a version before and after
allows you access to a certain version of memory how it is or was some
time ago (caching effect). It does not mean that the current state of
memory is fixed and neither does it allow syncing when an item is added
to the list.

So it could be that you are traversing a list that is missing one item
because it is not visible to this processor yet.

You may just see a state from the past. I would think that you will need a
real lock in order to get the desired effect.

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