On 16-08-29 06:38 AM, Jamal Hadi Salim wrote:
Let me see if i can
try something. Trickery with RCU is not one of my virtues -
so i may get it wrong but hope you can comment.
Something like attached? Compile tested.
I tried to emulate gact - but greping around I havent
seen sample code which uses rcu_read_un/lock + synchronize_rcu
this way
[so be gentle if i got it wrong ;->]
I am not sure where Cong is going but probably introducing
a rcu head in each policy will allow to swap and free old one
with call_rcu may be a better approach. The cost may come in
slowing down replace operations.
cheers,
jamal