Re: [PATCH] simplify update_times (avoid jiffies/jiffies_64 aliasing problem)

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

 



> b) On 64-bit machines jiffies and jiffies_64 always have the same
>    address (don't they?) Is the compiler really going to move a read of an
>    absolute address ahead of a modification of the same address?
> 
>    <looks>
> 
>    The address of jiffies isn't known until link time, so yup, the risk
>    is there.

Yes maybe it would be better to just use  #define there.
jiffies_64 always was a bit too clever.

> 
> c) jiffies is declared volatile.  In practice, if I know my gcc, it's
>    just not going to play these reordering games with a volatile.
> 
>    If that's true, and if some standard (presumably c99) says that it
>    must be true then I don't think we need the patch.

The standards definition of volatile is unfortunately quite vague,
so at least from this side you cannot rely on much.

Also I assume Atsushi-san did the patch because he saw a real problem?

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux