qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/8] rcu: add rcu library


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 2/8] rcu: add rcu library
Date: Thu, 15 Jan 2015 12:08:49 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0


On 15/01/2015 11:39, Fam Zheng wrote:
>> +How is this possible?  The basic idea is to split updates in two phases,
>> +"removal" and "reclamation".  During removal, we ensure that subsequent
>> +readers will not be able to get a reference to the old data.  After
>> +removal has completed, a critical section will not be able to access
>> +the old data.  Therefore, critical sections that begin after removal
>> +do not matter; as soon as all previous critical sections have finished,
>> +there cannot be any readers who hold references to the data structure,
>> +which may not be safely reclaimed (e.g., freed or unref'ed).
> 
> s/not/now/ ?

Both are correct depending on how you read the sentence, but it is
ambiguous.  The idea was that "because of readers holding references,
the data structures cannot be safely reclaimed".

I will change the last line to "and these can now be safely reclaimed".
 The "and" puts the sentence in relationship with "as soon as all
previous critical sections have finished", and "now" becomes
unambiguously correct.

>> +/*
>> + * Global grace period counter.  Bit 0 is always one in rcu_gp_ctr.
>> + * Bits 1 and above are defined in synchronize_rcu/update_counter_and_wait.
> 
> What is update_counter_and_wait?

It's part of URCU and is now merged into synchronize_rcu.  I'll fix the
comment.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]