34 Matching Annotations
  1. Aug 2024
    1. int vm_swappiness = 60;

      then main parameter that controls how aggressive the system will swap anon pages vs file pages.

    2. (sc->order > PAGE_ALLOC_COSTLY_ORDER || sc->priority < DEF_PRIORITY - 2))

      constants

    3. MIN_NR_GENS

      magic number?

    4. static long get_nr_to_scan(struct lruvec *lruvec, struct scan_control *sc, bool can_swap)

      figure out how many pages to scan.

    5. static void prepare_scan_control(pg_data_t *pgdat, struct scan_control *sc) {

      sets up the struct scan_control. Most of the value come from elsewhere but this function seems to bring it all together.

    1. Flag indicating whether KSM should run.

    2. flag indicating if KSM should merge same-pages across NUMA nodes

    3. KSM_ATTR(advisor_target_scan_time);

      target scan time -- used by the EWA?

    4. KSM_ATTR(advisor_max_pages_to_scan);

      max number of pages to scan per iteration

    5. KSM_ATTR(advisor_min_pages_to_scan);

      min pages to scan per iteration

    6. KSM_ATTR(advisor_max_cpu);

      max amount of cpu per iteration of the ksmd?

    7. KSM_ATTR(advisor_mode);

      the mode that ksm runs in -- only two for now.

    8. KSM_ATTR(smart_scan);

      smart scan -- not sure what this does

    9. KSM_ATTR(stable_node_chains_prune_millisecs);

      millis before a page is removed from the stable tree??

    10. KSM_ATTR(max_page_sharing);

      what is the max number of page sharings -- I think this is how many times a single page can be shared (to limit the length of the reverse map?)

    11. KSM_ATTR(use_zero_pages);

      shouls KSM use special zero page handling

    12. KSM_ATTR(merge_across_nodes);

      should ksm merge across NUMA nodes

    13. KSM_ATTR(run);

      flag indicating if ksm should run (0 or 1)

    14. KSM_ATTR(pages_to_scan);

      number of pages to scan per loop iteration

    15. KSM_ATTR(sleep_millisecs);

      sleep time between ksmd loop iterations

    16. ksm_thread_pages_to_scan

      how many pages to scan. This is what many of the other config values are trying to get at.

    17. #define DEFAULT_PAGES_TO_SCAN 100

      constant for the number of pages to scan

    18. Constant default value for pages to scan

    19. configuration for targeted scan time

    20. max pages to scan during a single pass of the KSM loop

    21. min number of pages to scan during a KSM loo[p

    22. config for how much cpu to consume.

    23. choose the mode to run -- either using EWA or just some fixed values.

    24. function to compute a EWA for the number of pages to scan. Uses many of the config parameters from sysfs

    25. configuration for how long before a page is pruned from the stable tree

    26. configuration for max page sharing -- not quite sure what this is doing

    27. Configuration to decide if KSM should use special handilng for pages filled with zeros.

    28. Configuration for the number of pages to scan with each run

    29. Configuration for how often the thread should run