Re: [RFC PATCH 1/4] hazptr: Add initial implementation of hazard pointers

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

 





Am 9/27/2024 um 8:13 PM schrieb Linus Torvalds:

Because even hiding the value one from the compiler will mean that it
can't use the comparison to decide that the originals are equal, even
if one of them is unhidden.

No?

               Linus

I think it depends on which one you hide.

If you do

 z = b;
 hide(z);
 if (a==z) { *b; }

then it will be fine, because it knows a==z but nothing about the relation of b with a or z.


But for

 z = a;
 hide(z);
 if (z==b) { *b; }

then it would still know that b == z, and could replace *b with *z (which really is *a).


Best wishes,
  jonas







[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux