Re: [PATCH] x86/pod: Do not fragment PoD memory allocations

2021-02-01 Thread Elliott Mitchell
On Mon, Feb 01, 2021 at 10:35:15AM +, George Dunlap wrote: > > > > On Jan 31, 2021, at 6:13 PM, Elliott Mitchell wrote: > > > > On Thu, Jan 28, 2021 at 10:42:27PM +, George Dunlap wrote: > >> > >>> On Jan 28, 2021, at 6:26 PM, Elliott Mitchell wrote: > >>> type = "hvm" > >>> memory =

Re: [PATCH] x86/pod: Do not fragment PoD memory allocations

2021-02-01 Thread George Dunlap
> On Jan 31, 2021, at 6:13 PM, Elliott Mitchell wrote: > > On Thu, Jan 28, 2021 at 10:42:27PM +, George Dunlap wrote: >> >>> On Jan 28, 2021, at 6:26 PM, Elliott Mitchell wrote: >>> type = "hvm" >>> memory = 1024 >>> maxmem = 1073741824 >>> >>> I suspect maxmem > free Xen memory may be s

Re: [PATCH] x86/pod: Do not fragment PoD memory allocations

2021-02-01 Thread Roger Pau Monné
On Sun, Jan 31, 2021 at 10:13:49AM -0800, Elliott Mitchell wrote: > On Thu, Jan 28, 2021 at 10:42:27PM +, George Dunlap wrote: > > > > > On Jan 28, 2021, at 6:26 PM, Elliott Mitchell wrote: > > > type = "hvm" > > > memory = 1024 > > > maxmem = 1073741824 > > > > > > I suspect maxmem > free X

Re: [PATCH] x86/pod: Do not fragment PoD memory allocations

2021-01-31 Thread Elliott Mitchell
On Thu, Jan 28, 2021 at 10:42:27PM +, George Dunlap wrote: > > > On Jan 28, 2021, at 6:26 PM, Elliott Mitchell wrote: > > type = "hvm" > > memory = 1024 > > maxmem = 1073741824 > > > > I suspect maxmem > free Xen memory may be sufficient. The instances I > > can be certain of have been maxm

Re: [PATCH] x86/pod: Do not fragment PoD memory allocations

2021-01-29 Thread George Dunlap
> On Jan 28, 2021, at 10:56 PM, George Dunlap wrote: > > > >> On Jan 28, 2021, at 10:42 PM, George Dunlap wrote: >> >> >> >>> On Jan 28, 2021, at 6:26 PM, Elliott Mitchell wrote: >>> >>> On Thu, Jan 28, 2021 at 11:19:41AM +0100, Jan Beulich wrote: On 27.01.2021 23:28, Elliott Mitch

Re: [PATCH] x86/pod: Do not fragment PoD memory allocations

2021-01-28 Thread George Dunlap
> On Jan 28, 2021, at 10:42 PM, George Dunlap wrote: > > > >> On Jan 28, 2021, at 6:26 PM, Elliott Mitchell wrote: >> >> On Thu, Jan 28, 2021 at 11:19:41AM +0100, Jan Beulich wrote: >>> On 27.01.2021 23:28, Elliott Mitchell wrote: On Wed, Jan 27, 2021 at 09:03:32PM +, Andrew Cooper

Re: [PATCH] x86/pod: Do not fragment PoD memory allocations

2021-01-28 Thread George Dunlap
> On Jan 28, 2021, at 6:26 PM, Elliott Mitchell wrote: > > On Thu, Jan 28, 2021 at 11:19:41AM +0100, Jan Beulich wrote: >> On 27.01.2021 23:28, Elliott Mitchell wrote: >>> On Wed, Jan 27, 2021 at 09:03:32PM +, Andrew Cooper wrote: So.?? What *should* happen is that if QEMU/OVMF dirtie

Re: [PATCH] x86/pod: Do not fragment PoD memory allocations

2021-01-28 Thread Elliott Mitchell
On Thu, Jan 28, 2021 at 11:19:41AM +0100, Jan Beulich wrote: > On 27.01.2021 23:28, Elliott Mitchell wrote: > > On Wed, Jan 27, 2021 at 09:03:32PM +, Andrew Cooper wrote: > >> So.?? What *should* happen is that if QEMU/OVMF dirties more memory than > >> exists in the PoD cache, the domain gets

Re: [PATCH] x86/pod: Do not fragment PoD memory allocations

2021-01-28 Thread Jan Beulich
On 27.01.2021 23:28, Elliott Mitchell wrote: > On Wed, Jan 27, 2021 at 09:03:32PM +, Andrew Cooper wrote: >> So.?? What *should* happen is that if QEMU/OVMF dirties more memory than >> exists in the PoD cache, the domain gets terminated. >> >> Irrespective, Xen/dom0 dying isn't an expected cons

Re: [PATCH] x86/pod: Do not fragment PoD memory allocations

2021-01-27 Thread Elliott Mitchell
On Wed, Jan 27, 2021 at 09:03:32PM +, Andrew Cooper wrote: > So.?? What *should* happen is that if QEMU/OVMF dirties more memory than > exists in the PoD cache, the domain gets terminated. > > Irrespective, Xen/dom0 dying isn't an expected consequence of any normal > action like this. > > Do

Re: [PATCH] x86/pod: Do not fragment PoD memory allocations

2021-01-27 Thread Andrew Cooper
On 27/01/2021 20:12, Elliott Mitchell wrote: > On Wed, Jan 27, 2021 at 10:47:19AM +0100, Jan Beulich wrote: >> On 26.01.2021 18:51, Elliott Mitchell wrote: >>> Okay, this has been reliably reproducing for a while. I had originally >>> thought it was a problem of HVM plus memory != maxmem, but the

Re: [PATCH] x86/pod: Do not fragment PoD memory allocations

2021-01-27 Thread Elliott Mitchell
On Wed, Jan 27, 2021 at 10:47:19AM +0100, Jan Beulich wrote: > On 26.01.2021 18:51, Elliott Mitchell wrote: > > Okay, this has been reliably reproducing for a while. I had originally > > thought it was a problem of HVM plus memory != maxmem, but the > > non-immediate restart disagrees with that as

Re: [PATCH] x86/pod: Do not fragment PoD memory allocations

2021-01-27 Thread Jan Beulich
On 26.01.2021 18:51, Elliott Mitchell wrote: > On Tue, Jan 26, 2021 at 12:08:15PM +0100, Jan Beulich wrote: >> On 25.01.2021 18:46, Elliott Mitchell wrote: >>> On Mon, Jan 25, 2021 at 10:56:25AM +0100, Jan Beulich wrote: On 24.01.2021 05:47, Elliott Mitchell wrote: > > --- > Change

Re: [PATCH] x86/pod: Do not fragment PoD memory allocations

2021-01-26 Thread Elliott Mitchell
On Tue, Jan 26, 2021 at 12:08:15PM +0100, Jan Beulich wrote: > On 25.01.2021 18:46, Elliott Mitchell wrote: > > On Mon, Jan 25, 2021 at 10:56:25AM +0100, Jan Beulich wrote: > >> On 24.01.2021 05:47, Elliott Mitchell wrote: > >>> > >>> --- > >>> Changes in v2: > >>> - Include the obvious removal of

Re: [PATCH] x86/pod: Do not fragment PoD memory allocations

2021-01-26 Thread Jan Beulich
On 25.01.2021 18:46, Elliott Mitchell wrote: > On Mon, Jan 25, 2021 at 10:56:25AM +0100, Jan Beulich wrote: >> On 24.01.2021 05:47, Elliott Mitchell wrote: >>> >>> --- >>> Changes in v2: >>> - Include the obvious removal of the goto target. Always realize you're >>> at the wrong place when you p

Re: [PATCH] x86/pod: Do not fragment PoD memory allocations

2021-01-25 Thread Elliott Mitchell
On Mon, Jan 25, 2021 at 10:56:25AM +0100, Jan Beulich wrote: > On 24.01.2021 05:47, Elliott Mitchell wrote: > > > > --- > > Changes in v2: > > - Include the obvious removal of the goto target. Always realize you're > > at the wrong place when you press "send". > > Please could you also label t

Re: [PATCH] x86/pod: Do not fragment PoD memory allocations

2021-01-25 Thread Andrew Cooper
On 25/01/2021 09:56, Jan Beulich wrote: > On 24.01.2021 05:47, Elliott Mitchell wrote: >> Previously p2m_pod_set_cache_target() would fall back to allocating 4KB >> pages if 2MB pages ran out. This is counterproductive since it suggests >> severe memory pressure and is likely a precursor to a memo

Re: [PATCH] x86/pod: Do not fragment PoD memory allocations

2021-01-25 Thread Jan Beulich
On 24.01.2021 05:47, Elliott Mitchell wrote: > Previously p2m_pod_set_cache_target() would fall back to allocating 4KB > pages if 2MB pages ran out. This is counterproductive since it suggests > severe memory pressure and is likely a precursor to a memory exhaustion > panic. As such don't try to

[PATCH] x86/pod: Do not fragment PoD memory allocations

2021-01-24 Thread Elliott Mitchell
Previously p2m_pod_set_cache_target() would fall back to allocating 4KB pages if 2MB pages ran out. This is counterproductive since it suggests severe memory pressure and is likely a precursor to a memory exhaustion panic. As such don't try to fill requests for 2MB pages from 4KB pages if 2MB pag

[PATCH] x86/pod: Do not fragment PoD memory allocations

2021-01-23 Thread Elliott Mitchell
Previously p2m_pod_set_cache_target() would fall back to allocating 4KB pages if 2MB pages ran out. This is counterproductive since it suggests severe memory pressure and is likely a precursor to a memory exhaustion panic. As such don't try to fill requests for 2MB pages from 4KB pages if 2MB pag