Re: [PATCH] Document Linux's memory barriers [try #2]



From: Paul Mackerras <paulus@xxxxxxxxx>
Date: Thu, 9 Mar 2006 09:01:57 +1100

On PPC machines, the PTE has a bit called G (for Guarded) which
indicates that the memory mapped by it has side effects. It prevents
the CPU from doing speculative accesses (i.e. the CPU can't send out a
load from the page until it knows for sure that the program will get
to that instruction) and from prefetching from the page.

The kernel sets G=1 on MMIO and PIO pages in general, as you would
expect, although you can get G=0 mappings for framebuffers etc. if you
ask specifically for that.

Sparc64 has a similar PTE bit called "E" for "side-Effect".
And we also do the same thing as powerpc for framebuffers.

Note that on sparc64 in our asm/io.h PIO/MMIO accessor macros
we use physical addresses, so we don't have to map anything
in ioremap(), and use a special address space identifier on
the loads and stores that indicates "E" behavior is desired.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: Fwd: Re: New Metrics to measure Load average
    ... School of Electrical and Information Engineering ... Currently for the Phd, I am using division of load as per login users and this is what I want to have for HPC and for the "Task Profiling Model". ... Be very wary if their planned CPU controller as the model that they intend to use will only work with CPU bound processes. ...
    (Linux-Kernel)
  • [PATCH 2/2] sched: Improve fairness of cpu allocation for task groups
    ... The current load balancing scheme isn't good for group fairness. ... Col4 -> CPU bandwidth received by each individual task of the group. ... Currently cpu's weight is just the summation of individual task weights. ...
    (Linux-Kernel)
  • [PATCH] sched: Consolidated and improved smpnice patch
    ... The introduction of separate run queues per CPU has brought with it "nice" enforcement problems that are best described by a simple example. ... whether this expectation is met is pretty much down to luck as there are four equally likely distributions of the tasks to the CPUs that the load balancing code will consider to be balanced with loads of 2.0 for each CPU. ... To overcome this problem SCHED_LOAD_SCALE has been replaced by the load_weight for the relevant task or by the average load_weight per task for the queue in question. ...
    (Linux-Kernel)
  • [PATCH 2/2] sched: Improve fairness of cpu allocation for task groups
    ... The current load balancing scheme isn't good for group fairness. ... Col4 -> CPU bandwidth received by each individual task of the group. ... Currently cpu's weight is just the summation of individual task weights. ...
    (Linux-Kernel)
  • Re: System Monitor
    ... Some applications are just hungry for CPU and RAM. ... A good rule of thumb is that a load of significantly more than 1.0 per ... > education and the case study affords you unmatched consulting experience. ... > Computer Emergency Response Teams, ...
    (Security-Basics)