> This patch adds high/low watermark parameter to res_counter. > splitted out from YAMAMOTO's background page reclaim for memory cgroup set.
thanks. > + * Watermarks > + * Should be changed automatically when the limit is changed and > + * keep low < high < limit. > + */ > + unsigned long long high_watermark; > + unsigned long long low_watermark; > + /* do you have any specific reason not to allow low == high == limit? if you want to ensure low < high < limit, it's better to make the default values below meet the condition as well. to me, it seems weird to prevent users from making these values back to the default. YAMAMOTO Takashi > @@ -17,6 +17,9 @@ > { > spin_lock_init(&counter->lock); > counter->limit = (unsigned long long)LLONG_MAX; > + counter->low_watermark = (unsigned long long)LLONG_MAX; > + counter->high_watermark = (unsigned long long)LLONG_MAX; > + counter->watermark_state = RES_WATERMARK_BELOW_LOW; > } > > int res_counter_charge_locked(struct res_counter *counter, unsigned long val) _______________________________________________ Containers mailing list [EMAIL PROTECTED] https://lists.linux-foundation.org/mailman/listinfo/containers _______________________________________________ Devel mailing list Devel@openvz.org https://openvz.org/mailman/listinfo/devel