Changeset c5396c1 in mainline for kernel/generic/src/mm/frame.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/generic/src/mm/frame.c

    r4a5f2b0 rc5396c1  
    6060#include <config.h>
    6161#include <str.h>
    62 
    63 #define BITMAP_BLOCK_SIZE  128
    6462
    6563zones_t zones;
     
    410408       
    411409        bitmap_initialize(&zones.info[z1].bitmap, zones.info[z1].count,
    412             BITMAP_BLOCK_SIZE, confdata +
    413             (sizeof(frame_t) * zones.info[z1].count));
     410            confdata + (sizeof(frame_t) * zones.info[z1].count));
    414411        bitmap_clear_range(&zones.info[z1].bitmap, 0, zones.info[z1].count);
    415412       
     
    578575                 */
    579576               
    580                 bitmap_initialize(&zone->bitmap, count, BITMAP_BLOCK_SIZE,
    581                     confdata + (sizeof(frame_t) * count));
     577                bitmap_initialize(&zone->bitmap, count, confdata +
     578                    (sizeof(frame_t) * count));
    582579                bitmap_clear_range(&zone->bitmap, 0, count);
    583580               
     
    591588                        frame_initialize(&zone->frames[i]);
    592589        } else {
    593                 bitmap_initialize(&zone->bitmap, 0, 0, NULL);
     590                bitmap_initialize(&zone->bitmap, 0, NULL);
    594591                zone->frames = NULL;
    595592        }
     
    605602size_t zone_conf_size(size_t count)
    606603{
    607         return (count * sizeof(frame_t) +
    608             bitmap_size(count, BITMAP_BLOCK_SIZE));
     604        return (count * sizeof(frame_t) + bitmap_size(count));
    609605}
    610606
Note: See TracChangeset for help on using the changeset viewer.