Changeset a55ddc64 in mainline for kernel/genarch/src/mm/page_ht.c


Ignore:
Timestamp:
2011-11-17T22:29:00Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ad12b5ea
Parents:
6b326ea1
Message:

Allocate PTEs from low memory.

  • Introduce a dedicated slab cache for pte_t's.
  • This should limit the depth of nested page faults.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/genarch/src/mm/page_ht.c

    r6b326ea1 ra55ddc64  
    6060static pte_t *ht_mapping_find(as_t *, uintptr_t, bool);
    6161
     62slab_cache_t *pte_cache = NULL;
     63
    6264/**
    6365 * This lock protects the page hash table. It must be acquired
     
    163165        pte_t *pte = hash_table_get_instance(item, pte_t, link);
    164166       
    165         free(pte);
     167        slab_free(pte_cache, pte);
    166168}
    167169
     
    188190       
    189191        if (!hash_table_find(&page_ht, key)) {
    190                 pte_t *pte = (pte_t *) malloc(sizeof(pte_t), FRAME_ATOMIC);
     192                pte_t *pte = slab_alloc(pte_cache, FRAME_LOWMEM | FRAME_ATOMIC);
    191193                ASSERT(pte != NULL);
    192194               
Note: See TracChangeset for help on using the changeset viewer.