tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pserialize_switchpoint() question



im probably not qualified to give an explanation but:

as i understand it, rcu is supposed to be a synchronization mechanism
that produces less contention/locks.

suppose we store our objects in a linked list:

[A] -> [myobj] -> [C]

In order to write, we can change the linked list to look like
[myobj]
[A] -> [C]

this is safe to do without atomics.

now we wait for a message that all other cores have completed the kernel
execution they were doing. once this is done then we know there is no
one who might read [myobj] while we modify it.

now we can modify it. when done we put it back on the list.

this way, reading doesn't need any lock at all.

pserialize was implemented differently as the rcu patent did not expire
then.
i think we use higher spl when reading, higher than can be used to
answer the xcall. but i am not sure.


Home | Main Index | Thread Index | Old Index