Re: [PATCH v2 05/17] xen/cpupool: switch cpupool list to normal list interface

2020-12-04 Thread Dario Faggioli
On Tue, 2020-12-01 at 09:21 +0100, Juergen Gross wrote: > Instead of open coding something like a linked list just use the > available functionality from list.h. > Yep, much better. > While adding the required new include to private.h sort the includes. > > Signed-off-by: From: Juergen Gross >

Re: [PATCH v2 05/17] xen/cpupool: switch cpupool list to normal list interface

2020-12-04 Thread Dario Faggioli
On Fri, 2020-12-04 at 17:16 +0100, Jürgen Groß wrote: > On 04.12.20 17:13, Dario Faggioli wrote: > > > > > > What I'd do is: > >   - add a comment here, explaining quickly exactly this fact, i.e., > >     that it's not that we've forgotten to deal with this and it's > > all > >     on purpose. Ac

Re: [PATCH v2 05/17] xen/cpupool: switch cpupool list to normal list interface

2020-12-04 Thread Jürgen Groß
On 04.12.20 17:13, Dario Faggioli wrote: On Tue, 2020-12-01 at 10:18 +0100, Jürgen Groß wrote: On 01.12.20 10:12, Jan Beulich wrote: What guarantees that you managed to find an unused ID, other than at current CPU speeds it taking too long to create 4 billion pools? Since you're doing this unde

Re: [PATCH v2 05/17] xen/cpupool: switch cpupool list to normal list interface

2020-12-04 Thread Dario Faggioli
On Tue, 2020-12-01 at 10:18 +0100, Jürgen Groß wrote: > On 01.12.20 10:12, Jan Beulich wrote: > > What guarantees that you managed to find an unused ID, other > > than at current CPU speeds it taking too long to create 4 > > billion pools? Since you're doing this under lock, wouldn't > > it help an

Re: [PATCH v2 05/17] xen/cpupool: switch cpupool list to normal list interface

2020-12-01 Thread Jürgen Groß
On 01.12.20 10:12, Jan Beulich wrote: On 01.12.2020 09:21, Juergen Gross wrote: @@ -260,23 +257,42 @@ static struct cpupool *cpupool_create( spin_lock(&cpupool_lock); -for_each_cpupool(q) +if ( poolid != CPUPOOLID_NONE ) { -last = (*q)->cpupool_id; -if

Re: [PATCH v2 05/17] xen/cpupool: switch cpupool list to normal list interface

2020-12-01 Thread Jan Beulich
On 01.12.2020 09:21, Juergen Gross wrote: > @@ -260,23 +257,42 @@ static struct cpupool *cpupool_create( > > spin_lock(&cpupool_lock); > > -for_each_cpupool(q) > +if ( poolid != CPUPOOLID_NONE ) > { > -last = (*q)->cpupool_id; > -if ( (poolid != CPUPOOLID_NONE)

[PATCH v2 05/17] xen/cpupool: switch cpupool list to normal list interface

2020-12-01 Thread Juergen Gross
Instead of open coding something like a linked list just use the available functionality from list.h. The allocation of a new cpupool id is not aware of a possible wrap. Fix that. While adding the required new include to private.h sort the includes. Signed-off-by: From: Juergen Gross --- V2: -