A question on the vale of memory water marks

larmbr zhan nasa4836 at gmail.com
Mon Mar 18 05:47:46 EDT 2013


Hi, all.

In "mm/page_alloc.c: __setup_per_zone_wmarks(void)"

 Look this:
    --- snip ---
     zone->watermark[WMARK_LOW]  = min_wmark_pages(zone) + (tmp >> 2);
     zone->watermark[WMARK_HIGH] = min_wmark_pages(zone) + (tmp >> 1);
    --- snip ---

    after min_wmark_pages(zone)(that is watermark[WMARK_MIN]) is calculated,
    the watermark[WMARK_HIGH] and watermark[WMARK_LOW] are based on it.
    And FYI,  for non-highmem zones,  watermark[WMARK_MIN] is exactly tmp.

    That said,  watermark[WMARK_HIGH] = 1.5 times watermark[WMARK_MIN]
                    watermark[WMARK_LOW] = 1.25 times watermark[WMARK_MIN]

    So we came to that question,  are the relation among them are just
established by usage
     or just by empirical formula?
--

Regards,
Zhan Jianyu



More information about the Kernelnewbies mailing list