Re: Question: Are there conflicts between the paragraph and the figure?

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

 




> 2023年5月2日 03:02,Paul E. McKenney <paulmck@xxxxxxxxxx> 写道:
> 
> On Mon, May 01, 2023 at 07:09:49PM +0800, Alan Huang wrote:
>> 
>>> 2023年5月1日 下午7:05,Alan Huang <mmpgouride@xxxxxxxxx> 写道:
>>> 
>>> Hi,
>>> 
>>> I’m reading section 9.5.4.9, in the second to the last paragraph, there is:
>>> 
>>> Before the first horizontal line, all readers see the leftmost myconfig structure,
>>> and after the second horizontal line, all readers will see the rightmost structure. 
>>> Between the two lines, that is, during the grace period, different readers might see different objects
>>> 
>>> I’m a little confused, in Figure 9.29, the xchg is before the first horizontal line, in my understanding, if the 
>>> reader’s reading is before the xchg, it will read the leftmost myconfg structure.
>> 
>> And if reader’s reading is after the xchg, it will see the rightmost structure, and because xchg is before the first horizontal line,
>> Readers before the first horizontal line may also see the rightmost structure.
>> 
>>> 
>>> So, are there some conflicts between the paragraph and the figure?
>>> 
>>> Please correct me if I’m wrong.
> 
> Consider the point in time just before the left-hand reader's
> rcu_read_unlock() and just after the right-hand reader's rcu_read_lock().
> These two readers are both running at that time, and one of those readers
> sees the old state and the other sees the new state.

The sentence that may lead to conflict is this one from the original text:

	Before the first horizontal line, all readers see the leftmost myconfig structure.

There may be a situation where:

	      				mcp = xchg(&curconfig, mcp);
	rcu_read_lock(); 
	mcp = …
	*cur_a = mcp->a; 
-------------------------------------------------first horizontal line-------------------------------------------------

So, the reader will see the rightmost myconfig structure although it is before the first horizontal line.


BTW, the original text says that black dotted arrows pointing from an older event to a newer event, 
but there exists two black dotted arrows in the wrong direction:

	1.The arrow pointing from synchronize_rcu() to left-hand rcu_read_lock()
	2.The arrow pointing right-hand rcu_read_lock() to synchronize_rcu() 

The directions of the two arrows above may need to be adjusted. I tried to modify this, but after a few hours, I still can’t figure out the svg...

Thanks,
Alan

> 
> Does that help, or am I missing the point of your question?
> 
> Thanx, Paul





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux