Changeset c5396c1 in mainline for kernel/arch/amd64/src/ddi/ddi.c


Ignore:
Timestamp:
2013-09-12T10:27:17Z (11 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6e75f2d
Parents:
4a5f2b0
Message:

abandon the 2nd level bitmap
according to observations it is very rare to have allocation requests for more than 8 frames, therefore the conservative update of the 2nd level bitmap can hardly provide any benefits
the natural blocking of the bitmap (by bytes) should provide a reasonable performance

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/src/ddi/ddi.c

    r4a5f2b0 rc5396c1  
    6868                 */
    6969               
    70                 void *store = malloc(bitmap_size(elements, 0), FRAME_ATOMIC);
     70                void *store = malloc(bitmap_size(elements), FRAME_ATOMIC);
    7171                if (!store)
    7272                        return ENOMEM;
    7373               
    7474                bitmap_t oldiomap;
    75                 bitmap_initialize(&oldiomap, task->arch.iomap.elements, 0,
     75                bitmap_initialize(&oldiomap, task->arch.iomap.elements,
    7676                    task->arch.iomap.bits);
    7777               
    78                 bitmap_initialize(&task->arch.iomap, elements, 0, store);
     78                bitmap_initialize(&task->arch.iomap, elements, store);
    7979               
    8080                /*
     
    129129               
    130130                bitmap_t iomap;
    131                 bitmap_initialize(&iomap, TSS_IOMAP_SIZE * 8, 0,
     131                bitmap_initialize(&iomap, TSS_IOMAP_SIZE * 8,
    132132                    CPU->arch.tss->iomap);
    133133                bitmap_copy(&iomap, &TASK->arch.iomap, elements);
     
    157157       
    158158        descriptor_t *gdt_p = (descriptor_t *) cpugdtr.base;
    159         size_t size = bitmap_size(elements, 0);
     159        size_t size = bitmap_size(elements);
    160160        gdt_tss_setlimit(&gdt_p[TSS_DES], TSS_BASIC_SIZE + size);
    161161        gdtr_load(&cpugdtr);
Note: See TracChangeset for help on using the changeset viewer.