| Both sides previous revision Previous revision Next revision | Previous revision |
| alancox:pmapreview [2020/09/03 10:13] – D22606 Has been committed AndrewTurner | alancox:pmapreview [2022/09/06 08:37] (current) – AndrewTurner |
|---|
| * Eliminate unnecessary I/D-Cache coherence operations. | * Eliminate unnecessary I/D-Cache coherence operations. |
| * //On a machine with a PIPT L1 I-cache, I tried reenabling selective "ic" operations in arm64_icache_flush_range() (rather than flushing the entire I-cache), but performance got slightly worse.// | * //On a machine with a PIPT L1 I-cache, I tried reenabling selective "ic" operations in arm64_icache_flush_range() (rather than flushing the entire I-cache), but performance got slightly worse.// |
| * BUG: pmap_enter_l2() is often used to map code superpages. However, we do not currently call arm64_icache_flush_range(). | * <del>BUG: pmap_enter_l2() is often used to map code superpages. However, we do not currently call arm64_icache_flush_range().</del> https://reviews.freebsd.org/D31181 |
| * These coherence operations can be disabled on some newer cores, //e.g.//, Graviton 2, which implement coherence in hardware. Use an IFUNC? | * <del>These coherence operations can be disabled on some newer cores, //e.g.//, Graviton 2, which implement coherence in hardware.</del> Use an IFUNC? |
| * //On these cores, the "ic" instruction never broadcasts an invalidation, so most of the overhead is automatically eliminated.// | * //On these cores, the "ic" instruction never broadcasts an invalidation, so most of the overhead is automatically eliminated.// |
| * <del>Implement access bit emulation.</del> | * <del>Implement access bit emulation.</del> |
| * Add support for L2_BLOCK mappings to pmap_kenter(). | * Add support for L2_BLOCK mappings to pmap_kenter(). |
| * Start using the ATTR_CONTIGUOUS flag. | * Start using the ATTR_CONTIGUOUS flag. |
| * Specifically, I would start by writing a "demotion" function, put in hooks to call it in, e.g., pmap_enter(). Then, start with setting it in pmap_enter_object(). | * **[In progress: alc]** Specifically, I would start by writing a "demotion" function, put in hooks to call it in, e.g., pmap_enter(). Then, start with setting it in pmap_enter_object(). |
| * //This may reduce the number of access bit emulation faults. Maybe we want to preset ATTR_AF on the contiguous PTEs since we have to treat them as accessed anyway.// | * //This may reduce the number of access bit emulation faults. Maybe we want to preset ATTR_AF on the contiguous PTEs since we have to treat them as accessed anyway.// |
| * Consider doing promotion in pmap_fault(). | * Consider doing promotion in pmap_fault(). |
| * pmap_enter() need not perform a TLB invalidation on a wiring change. In places like pmap_enter() or pmap_remove(), we don't need to invalidate the TLB if ATTR_AF is clear. | * pmap_enter() need not perform a TLB invalidation on a wiring change. In places like pmap_enter() or pmap_remove(), we don't need to invalidate the TLB if ATTR_AF is clear. |
| * pmap_invalidate_range() should flush the entire TLB if the range exceeds a threshold. | * pmap_invalidate_range() should flush the entire TLB if the range exceeds a threshold. |
| * With TLBI you can choose whether "page walk cache" entries are flushed. So, operations, like pmap_protect(), that do not deallocate l2 or l3 tables could use a variant of pmap_invalidate_range() that only invalidates leaf-level entries. | * <del>With TLBI you can choose whether "page walk cache" entries are flushed. So, operations, like pmap_protect(), that do not deallocate l2 or l3 tables could use a variant of pmap_invalidate_range() that only invalidates leaf-level entries.</del> **4ccd6c137f5b** |
| * <del>Given that the TLBI "is" variants broadcast the invalidation to other cores, I don't see why we are pinning to a core at the start of pmap_invalidate_*().</del> **r355145** | * <del>Given that the TLBI "is" variants broadcast the invalidation to other cores, I don't see why we are pinning to a core at the start of pmap_invalidate_*().</del> **r355145** |
| * <del>BUG: Preemption after an "ic" or "tlbi" instruction but before a "dsb" instruction by the same processor is problematic.</del> **r355427** | * <del>BUG: Preemption after an "ic" or "tlbi" instruction but before a "dsb" instruction by the same processor is problematic.</del> **r355427** |
| * Should pmap_remove_pages() remember the last l3pg as a hint to avoid PHYS_TO_VM_PAGE() calls? | * Should pmap_remove_pages() remember the last l3pg as a hint to avoid PHYS_TO_VM_PAGE() calls? |
| * <del>Change vmspace0's pmap to use a zeroed physical page as the root of the ttbr0 page table. Currently, it inherits an identity mapping from locore.S. https://reviews.freebsd.org/D22606</del> | * <del>Change vmspace0's pmap to use a zeroed physical page as the root of the ttbr0 page table. Currently, it inherits an identity mapping from locore.S. https://reviews.freebsd.org/D22606</del> |
| * **[In progress: alc]** Port r352874 from amd64: Defer freeing of PV chunk pages in pmap_remove_pages() until after the last PV list lock is released. | * Port r352874 from amd64: Defer freeing of PV chunk pages in pmap_remove_pages() until after the last PV list lock is released. |
| | * **[In progress: andrew]** |
| | * <del>Use the ttbr %%CnP%% flag</del> |
| | * <del>**[In progress: andrew]** Not seeing any performance improvements in current (2021) hardware</del> |
| |
| ---- | ---- |