Skip to content
  • Wen Congyang's avatar
    c097a60b
    rcu: Allow calling rcu_(un)register_thread() during synchronize_rcu() · c097a60b
    Wen Congyang authored
    
    
    If rcu_(un)register_thread() is called together with synchronize_rcu(),
    it will wait for the synchronize_rcu() to finish. But when synchronize_rcu()
    waits for some events, we can modify the list registry.
    We also use the lock rcu_gp_lock to assume that synchronize_rcu() isn't
    executed in more than one thread at the same time. Add a new mutex lock
    rcu_sync_lock to assume it and rename rcu_gp_lock to rcu_registry_lock.
    Release rcu_registry_lock when synchronize_rcu() waits for some events.
    
    Signed-off-by: default avatarWen Congyang <wency@cn.fujitsu.com>
    Message-Id: <55B59652.4090503@cn.fujitsu.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    c097a60b
    rcu: Allow calling rcu_(un)register_thread() during synchronize_rcu()
    Wen Congyang authored
    
    
    If rcu_(un)register_thread() is called together with synchronize_rcu(),
    it will wait for the synchronize_rcu() to finish. But when synchronize_rcu()
    waits for some events, we can modify the list registry.
    We also use the lock rcu_gp_lock to assume that synchronize_rcu() isn't
    executed in more than one thread at the same time. Add a new mutex lock
    rcu_sync_lock to assume it and rename rcu_gp_lock to rcu_registry_lock.
    Release rcu_registry_lock when synchronize_rcu() waits for some events.
    
    Signed-off-by: default avatarWen Congyang <wency@cn.fujitsu.com>
    Message-Id: <55B59652.4090503@cn.fujitsu.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Loading