Re: [PATCH] "volatile considered harmful", take 2

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

 



Jonathan Corbet wrote:
> +The key point to understand with regard to volatile is that its purpose is
> +to suppress optimization, which is almost never what one really wants to
> +do.  In the kernel, one must protect shared data structures against
> +unwanted concurrent access, which is very much a different task.  As it
> +happens, once the critical sections are properly implemented, the compiler
> +optimization issues which volatile was added to prevent will have been
> +taken care of in a more efficient way.

The "As it happens... efficient way." sentence is hard to read:  It is
long and nested like in German, combined with several English
ambiguities (e.g. WRT noun vs. verb vs. adjective).  Maybe just leave
this sentence out, as it is redundant to later statements like "In
properly-written kernel code, volatile can only serve to slow things down".
-- 
Stefan Richter
-=====-=-=== -=-= -=-==
http://arcgraph.de/sr/
-
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