Re: [PATCH -perfbook] whymb: Fix description of compiler mischief

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

 



On Wed, Dec 02, 2020 at 11:50:27PM +0900, Akira Yokosawa wrote:
> >From 89ab8426f9821b6a8bf86e9d4f7eb596e0cfed73 Mon Sep 17 00:00:00 2001
> From: Akira Yokosawa <akiyks@xxxxxxxxx>
> Date: Wed, 2 Dec 2020 07:35:08 +0900
> Subject: [PATCH -perfbook] whymb: Fix description of compiler mischief
> 
> In this code snippet, the assertion can not fire due to different
> reasons.
> When bar() observes b == 1, the smp_mb() assures a == 1.
> When bar() observes b == 0, the while loop will loop forever and
> the assertion can't be reached.
> 
> This was pointed out by Motohiro Kanda in his Japanese translation
> of perfbook [1].
> 
> [1]: https://sites.google.com/site/kandamotohiro/perfbook-d/perfbookappendixf10
> 
> Cc: Motohiro Kanda <kanda.motohiro@xxxxxxxxx>
> Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx>

I took this patch as is, but added a patch on top that (hopefully)
does a better job of explaining the situation.  Thank you both!!!

Would it also help to add a reference to the discussion of control
dependencies?  The straightforward answer given that information is
"control dependencies do not order later loads".

Motohiro, would you be OK with my mentioning your translation in the
next set of release notes for perfbook?  Either way, I much appreciate
your doing this work!

							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