Re: [PATCH] hostmem: default the amount of prealloc-threads to smp-cpus

2022-05-19 Thread Igor Mammedov
On Wed, 18 May 2022 16:06:47 +0200 Paolo Bonzini wrote: > On 5/18/22 15:31, Daniel P. Berrangé wrote: > > When picking defaults there is never a perfect answer, it > > is more a matter of the least-worst option. > > > > It is pretty clear that nthreads=1 is terrible for any > > large VMs. Defaul

Re: [PATCH] hostmem: default the amount of prealloc-threads to smp-cpus

2022-05-18 Thread Paolo Bonzini
On 5/18/22 15:31, Daniel P. Berrangé wrote: When picking defaults there is never a perfect answer, it is more a matter of the least-worst option. It is pretty clear that nthreads=1 is terrible for any large VMs. Defaulting it to nvcpus made conceptual sense as the user has implicit said that the

Re: [PATCH] hostmem: default the amount of prealloc-threads to smp-cpus

2022-05-18 Thread Daniel P . Berrangé
On Wed, May 18, 2022 at 03:02:48PM +0200, Dario Faggioli wrote: > On Wed, 2022-05-18 at 12:17 +0200, Igor Mammedov wrote: > > On Tue, 17 May 2022 20:46:50 +0200 > > Paolo Bonzini wrote: > > > > diff --git a/backends/hostmem.c b/backends/hostmem.c > > > > index a7bae3d713..624bb7ecd3 100644 > > > >

Re: [PATCH] hostmem: default the amount of prealloc-threads to smp-cpus

2022-05-18 Thread Dario Faggioli
On Wed, 2022-05-18 at 12:17 +0200, Igor Mammedov wrote: > On Tue, 17 May 2022 20:46:50 +0200 > Paolo Bonzini wrote: > > > diff --git a/backends/hostmem.c b/backends/hostmem.c > > > index a7bae3d713..624bb7ecd3 100644 > > > --- a/backends/hostmem.c > > > +++ b/backends/hostmem.c > > > @@ -274,7 +27

Re: [PATCH] hostmem: default the amount of prealloc-threads to smp-cpus

2022-05-18 Thread Igor Mammedov
On Tue, 17 May 2022 20:46:50 +0200 Paolo Bonzini wrote: > On 5/17/22 14:38, dzej...@gmail.com wrote: > > From: Jaroslav Jindrak > > > > Prior to the introduction of the prealloc-threads property, the amount > > of threads used to preallocate memory was derived from the value of > > smp-cpus pas

Re: [PATCH] hostmem: default the amount of prealloc-threads to smp-cpus

2022-05-18 Thread Igor Mammedov
On Tue, 17 May 2022 17:33:54 +0100 Daniel P. Berrangé wrote: > On Tue, May 17, 2022 at 05:12:28PM +0200, Igor Mammedov wrote: > > On Tue, 17 May 2022 14:38:58 +0200 > > dzej...@gmail.com wrote: > > > > > From: Jaroslav Jindrak > > > > > > Prior to the introduction of the prealloc-threads pro

Re: [PATCH] hostmem: default the amount of prealloc-threads to smp-cpus

2022-05-17 Thread Paolo Bonzini
On 5/17/22 14:38, dzej...@gmail.com wrote: From: Jaroslav Jindrak Prior to the introduction of the prealloc-threads property, the amount of threads used to preallocate memory was derived from the value of smp-cpus passed to qemu, the amount of physical cpus of the host and a hardcoded maximum v

Re: [PATCH] hostmem: default the amount of prealloc-threads to smp-cpus

2022-05-17 Thread Daniel P . Berrangé
On Tue, May 17, 2022 at 05:12:28PM +0200, Igor Mammedov wrote: > On Tue, 17 May 2022 14:38:58 +0200 > dzej...@gmail.com wrote: > > > From: Jaroslav Jindrak > > > > Prior to the introduction of the prealloc-threads property, the amount > > of threads used to preallocate memory was derived from th

Re: [PATCH] hostmem: default the amount of prealloc-threads to smp-cpus

2022-05-17 Thread Jaroslav Jindrák
On Tue, 17 May 2022 at 17:12, Igor Mammedov wrote: > > On Tue, 17 May 2022 14:38:58 +0200 > dzej...@gmail.com wrote: > > > From: Jaroslav Jindrak > > > > Prior to the introduction of the prealloc-threads property, the amount > > of threads used to preallocate memory was derived from the value of

Re: [PATCH] hostmem: default the amount of prealloc-threads to smp-cpus

2022-05-17 Thread Igor Mammedov
On Tue, 17 May 2022 14:38:58 +0200 dzej...@gmail.com wrote: > From: Jaroslav Jindrak > > Prior to the introduction of the prealloc-threads property, the amount > of threads used to preallocate memory was derived from the value of > smp-cpus passed to qemu, the amount of physical cpus of the host

[PATCH] hostmem: default the amount of prealloc-threads to smp-cpus

2022-05-17 Thread dzejrou
From: Jaroslav Jindrak Prior to the introduction of the prealloc-threads property, the amount of threads used to preallocate memory was derived from the value of smp-cpus passed to qemu, the amount of physical cpus of the host and a hardcoded maximum value. When the prealloc-threads property was