Changeset 80dabb8d in mainline for kernel/generic/src/mm/page.c


Ignore:
Timestamp:
2008-06-12T07:49:23Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e25eca80
Parents:
11e9061d
Message:

Add a comment explaining the reason for a memory barrier after page table update in detail.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/mm/page.c

    r11e9061d r80dabb8d  
    3939 * Functions here are mere wrappers that call the real implementation.
    4040 * They however, define the single interface.
     41 */
     42
     43/*
     44 * Note on memory prefetching and updating memory mappings, also described in:
     45 * AMD x86-64 Architecture Programmer's Manual, Volume 2, System Programming,
     46 * 7.2.1 Special Coherency Considerations.
     47 *
     48 * The processor which modifies a page table mapping can access prefetched data
     49 * from the old mapping.  In order to prevent this, we place a memory barrier
     50 * after a mapping is updated.
     51 *
     52 * We assume that the other processors are either not using the mapping yet
     53 * (i.e. during the bootstrap) or are executing the TLB shootdown code.  While
     54 * we don't care much about the former case, the processors in the latter case
     55 * will do an implicit serialization by virtue of running the TLB shootdown
     56 * interrupt handler.
    4157 */
    4258
Note: See TracChangeset for help on using the changeset viewer.