Re: [PATCH V2 RFC 3/3] kvm: Check system load and handle different commit cases accordingly

2012-10-31 Thread Raghavendra K T
On 10/30/2012 02:37 PM, Andrew Jones wrote: On Tue, Oct 30, 2012 at 01:01:54PM +0530, Raghavendra K T wrote: On 10/30/2012 12:04 PM, Andrew Jones wrote: On Tue, Oct 30, 2012 at 11:27:52AM +0530, Raghavendra K T wrote: On 10/29/2012 11:24 PM, Peter Zijlstra wrote: On Mon, 2012-10-29 at 19:37

Re: [PATCH V2 RFC 3/3] kvm: Check system load and handle different commit cases accordingly

2012-10-31 Thread Raghavendra K T
On 10/30/2012 01:44 PM, Peter Zijlstra wrote: On Tue, 2012-10-30 at 11:27 +0530, Raghavendra K T wrote: Okay, now IIUC, usage of *any* global measure is bad? Yep, people like to carve up their machines, esp. now that they're somewhat bigger than they used to be. This can result in very

Re: [PATCH V2 RFC 3/3] kvm: Check system load and handle different commit cases accordingly

2012-10-31 Thread Raghavendra K T
On 10/30/2012 01:44 PM, Peter Zijlstra wrote: On Tue, 2012-10-30 at 11:27 +0530, Raghavendra K T wrote: Okay, now IIUC, usage of *any* global measure is bad? Yep, people like to carve up their machines, esp. now that they're somewhat bigger than they used to be. This can result in very

Re: [PATCH V2 RFC 3/3] kvm: Check system load and handle different commit cases accordingly

2012-10-31 Thread Raghavendra K T
On 10/30/2012 02:37 PM, Andrew Jones wrote: On Tue, Oct 30, 2012 at 01:01:54PM +0530, Raghavendra K T wrote: On 10/30/2012 12:04 PM, Andrew Jones wrote: On Tue, Oct 30, 2012 at 11:27:52AM +0530, Raghavendra K T wrote: On 10/29/2012 11:24 PM, Peter Zijlstra wrote: On Mon, 2012-10-29 at 19:37

Re: [PATCH V2 RFC 3/3] kvm: Check system load and handle different commit cases accordingly

2012-10-30 Thread Andrew Jones
On Tue, Oct 30, 2012 at 01:01:54PM +0530, Raghavendra K T wrote: > On 10/30/2012 12:04 PM, Andrew Jones wrote: > >On Tue, Oct 30, 2012 at 11:27:52AM +0530, Raghavendra K T wrote: > >>On 10/29/2012 11:24 PM, Peter Zijlstra wrote: > >>>On Mon, 2012-10-29 at 19:37 +0530, Raghavendra K T wrote: >

Re: [PATCH V2 RFC 3/3] kvm: Check system load and handle different commit cases accordingly

2012-10-30 Thread Peter Zijlstra
On Tue, 2012-10-30 at 11:27 +0530, Raghavendra K T wrote: > Okay, now IIUC, usage of *any* global measure is bad? Yep, people like to carve up their machines, esp. now that they're somewhat bigger than they used to be. This can result in very asymmetric loads, no global measure can ever deal with

Re: [PATCH V2 RFC 3/3] kvm: Check system load and handle different commit cases accordingly

2012-10-30 Thread Raghavendra K T
On 10/30/2012 12:04 PM, Andrew Jones wrote: On Tue, Oct 30, 2012 at 11:27:52AM +0530, Raghavendra K T wrote: On 10/29/2012 11:24 PM, Peter Zijlstra wrote: On Mon, 2012-10-29 at 19:37 +0530, Raghavendra K T wrote: +/* + * A load of 2048 corresponds to 1:1 overcommit + * undercommit threshold

Re: [PATCH V2 RFC 3/3] kvm: Check system load and handle different commit cases accordingly

2012-10-30 Thread Andrew Jones
On Tue, Oct 30, 2012 at 11:27:52AM +0530, Raghavendra K T wrote: > On 10/29/2012 11:24 PM, Peter Zijlstra wrote: > >On Mon, 2012-10-29 at 19:37 +0530, Raghavendra K T wrote: > >>+/* > >>+ * A load of 2048 corresponds to 1:1 overcommit > >>+ * undercommit threshold is half the 1:1 overcommit > >>+

Re: [PATCH V2 RFC 3/3] kvm: Check system load and handle different commit cases accordingly

2012-10-30 Thread Raghavendra K T
On 10/29/2012 11:24 PM, Peter Zijlstra wrote: On Mon, 2012-10-29 at 19:37 +0530, Raghavendra K T wrote: +/* + * A load of 2048 corresponds to 1:1 overcommit + * undercommit threshold is half the 1:1 overcommit + * overcommit threshold is 1.75 times of 1:1 overcommit threshold + */ +#define

Re: [PATCH V2 RFC 3/3] kvm: Check system load and handle different commit cases accordingly

2012-10-30 Thread Raghavendra K T
On 10/29/2012 11:24 PM, Peter Zijlstra wrote: On Mon, 2012-10-29 at 19:37 +0530, Raghavendra K T wrote: +/* + * A load of 2048 corresponds to 1:1 overcommit + * undercommit threshold is half the 1:1 overcommit + * overcommit threshold is 1.75 times of 1:1 overcommit threshold + */ +#define

Re: [PATCH V2 RFC 3/3] kvm: Check system load and handle different commit cases accordingly

2012-10-30 Thread Andrew Jones
On Tue, Oct 30, 2012 at 11:27:52AM +0530, Raghavendra K T wrote: On 10/29/2012 11:24 PM, Peter Zijlstra wrote: On Mon, 2012-10-29 at 19:37 +0530, Raghavendra K T wrote: +/* + * A load of 2048 corresponds to 1:1 overcommit + * undercommit threshold is half the 1:1 overcommit + * overcommit

Re: [PATCH V2 RFC 3/3] kvm: Check system load and handle different commit cases accordingly

2012-10-30 Thread Raghavendra K T
On 10/30/2012 12:04 PM, Andrew Jones wrote: On Tue, Oct 30, 2012 at 11:27:52AM +0530, Raghavendra K T wrote: On 10/29/2012 11:24 PM, Peter Zijlstra wrote: On Mon, 2012-10-29 at 19:37 +0530, Raghavendra K T wrote: +/* + * A load of 2048 corresponds to 1:1 overcommit + * undercommit threshold

Re: [PATCH V2 RFC 3/3] kvm: Check system load and handle different commit cases accordingly

2012-10-30 Thread Peter Zijlstra
On Tue, 2012-10-30 at 11:27 +0530, Raghavendra K T wrote: Okay, now IIUC, usage of *any* global measure is bad? Yep, people like to carve up their machines, esp. now that they're somewhat bigger than they used to be. This can result in very asymmetric loads, no global measure can ever deal with

Re: [PATCH V2 RFC 3/3] kvm: Check system load and handle different commit cases accordingly

2012-10-30 Thread Andrew Jones
On Tue, Oct 30, 2012 at 01:01:54PM +0530, Raghavendra K T wrote: On 10/30/2012 12:04 PM, Andrew Jones wrote: On Tue, Oct 30, 2012 at 11:27:52AM +0530, Raghavendra K T wrote: On 10/29/2012 11:24 PM, Peter Zijlstra wrote: On Mon, 2012-10-29 at 19:37 +0530, Raghavendra K T wrote: +/* + * A load

Re: [PATCH V2 RFC 3/3] kvm: Check system load and handle different commit cases accordingly

2012-10-29 Thread Peter Zijlstra
On Mon, 2012-10-29 at 19:37 +0530, Raghavendra K T wrote: > +/* > + * A load of 2048 corresponds to 1:1 overcommit > + * undercommit threshold is half the 1:1 overcommit > + * overcommit threshold is 1.75 times of 1:1 overcommit threshold > + */ > +#define COMMIT_THRESHOLD (FIXED_1) > +#define

[PATCH V2 RFC 3/3] kvm: Check system load and handle different commit cases accordingly

2012-10-29 Thread Raghavendra K T
From: Raghavendra K T The patch indroduces a helper function that calculates the system load (idea borrowed from loadavg calculation). The load is normalized to 2048 i.e., return value (threshold) of 2048 implies an approximate 1:1 committed guest. In undercommit cases (threshold/2) we simply

[PATCH V2 RFC 3/3] kvm: Check system load and handle different commit cases accordingly

2012-10-29 Thread Raghavendra K T
From: Raghavendra K T raghavendra...@linux.vnet.ibm.com The patch indroduces a helper function that calculates the system load (idea borrowed from loadavg calculation). The load is normalized to 2048 i.e., return value (threshold) of 2048 implies an approximate 1:1 committed guest. In

Re: [PATCH V2 RFC 3/3] kvm: Check system load and handle different commit cases accordingly

2012-10-29 Thread Peter Zijlstra
On Mon, 2012-10-29 at 19:37 +0530, Raghavendra K T wrote: +/* + * A load of 2048 corresponds to 1:1 overcommit + * undercommit threshold is half the 1:1 overcommit + * overcommit threshold is 1.75 times of 1:1 overcommit threshold + */ +#define COMMIT_THRESHOLD (FIXED_1) +#define