OpenVZ Forum


Home » Mailing lists » Devel » [RFC][ only for review ] memory controller bacground reclaim [0/5]
Re: [RFC][ only for review ] memory controller bacground reclaim [3/5] high/low watermark support in [message #23931 is a reply to message #23864] Thu, 29 November 2007 02:56 Go to previous messageGo to previous message
yamamoto is currently offline  yamamoto
Messages: 97
Registered: July 2007
Member
> 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
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [PATCH net-2.6.25 2/3][IPV6] Unify and cleanup calls to addrconf_sysctl_register
Next Topic: [PATCH 0/4 net-2.6.15][UNIX] Make unix sysctls per-namespace
Goto Forum:
  


Current Time: Thu Aug 07 08:53:13 GMT 2025

Total time taken to generate the page: 1.89027 seconds