Ticket #6178: system-info-wim.patch

File system-info-wim.patch, 1.8 KB (added by Wim, 11 years ago)

Separatly report the ignored memory instead of adding it to the max_pages and used_pages

  • src/system/kernel/vm/vm_page.cpp

     
    36253625    // can't really be freed in a low memory situation.
    36263626    page_num_t blockCachePages = block_cache_used_memory() / B_PAGE_SIZE;
    36273627
    3628     info->max_pages = sNumPages - sNonExistingPages + sIgnoredPages;
    3629     info->used_pages = gMappedPagesCount - blockCachePages + sIgnoredPages;
     3628    info->max_pages = sNumPages - sNonExistingPages;
     3629    info->used_pages = gMappedPagesCount - blockCachePages;
    36303630    info->cached_pages = info->max_pages >= free + info->used_pages
    36313631        ? info->max_pages - free - info->used_pages : 0;
    36323632    info->page_faults = vm_num_page_faults();
     3633    info->ignored_pages = sIgnoredPages;
    36333634
    36343635    // TODO: We don't consider pages used for page directories/tables yet.
    36353636}
  • headers/os/kernel/OS.h

     
    699699    int64           bus_clock_speed;    /* bus clock speed (Hz) */
    700700    enum platform_types platform_type;  /* type of machine we're on */
    701701
    702     int32           max_pages;          /* total # physical pages */
    703     int32           used_pages;         /* # physical pages in use */
     702    int32           max_pages;          /* total # of accessible pages */
     703    int32           used_pages;         /* # of accessible pages in use */
    704704    int32           page_faults;        /* # of page faults */
    705705    int32           max_sems;
    706706    int32           used_sems;
     
    717717    int64           kernel_version;
    718718
    719719    bigtime_t       _busy_wait_time;    /* reserved for whatever */
     720
    720721    int32           cached_pages;
    721 
    722722    uint32          abi;                /* the system API */
    723 
    724     int32           pad[2];
     723    int32           ignored_pages;      /* # of ignored/inaccessible pages */
     724    int32           pad;
    725725} system_info;
    726726
    727727/* system private, use macro instead */