• Home
  • Raw
  • Download

Lines Matching +full:processor +full:- +full:a +full:- +full:side

5 ------------------------------------------------
8 changed outside of the current thread of execution; as a result, they are
11 as a sort of easy atomic variable, which they are not. The use of volatile in
17 unwanted concurrent access, which is very much a different task. The
19 all optimization-related problems in a more efficient way.
25 almost certainly a bug in the code somewhere. In properly-written kernel
28 Consider a typical block of kernel code::
38 primitives act as memory barriers - they are explicitly written to do so -
41 spin_lock() call, since it acts as a memory barrier, will force it to
50 unnecessary - and potentially harmful.
52 The volatile storage class was originally meant for memory-mapped I/O
55 accesses within a critical section. But, within the kernel, I/O memory
62 when the processor is busy-waiting on the value of a variable. The right
63 way to perform a busy wait is::
68 The cpu_relax() call can lower CPU power consumption or yield to a
69 hyperthreaded twin processor; it also happens to serve as a compiler
70 barrier, so, once again, volatile is unnecessary. Of course, busy-
71 waiting is generally an anti-social act to begin with.
73 There are still a few rare situations where volatile makes sense in the
76 - The above-mentioned accessor functions might use volatile on
78 each accessor call becomes a little critical section on its own and
81 - Inline assembly code which changes memory, but which has no other
82 visible side effects, risks being deleted by GCC. Adding the volatile
85 - The jiffies variable is special in that it can have a different value
89 to be a "stupid legacy" issue (Linus's words) in this regard; fixing it
92 - Pointers to data structures in coherent memory which might be modified
93 by I/O devices can, sometimes, legitimately be volatile. A ring buffer
94 used by a network adapter, where that adapter changes pointers to
98 For most code, none of the above justifications for volatile apply. As a
99 result, the use of volatile is likely to be seen as a bug and will bring
101 volatile should take a step back and think about what they are truly trying
104 Patches to remove volatile variables are generally welcome - as long as
105 they come with a justification which shows that the concurrency issues have