Re: [Xen-devel] [PATCH 1/2] xen/mm: fold PGC_broken into PGC_state bits

2020-03-20 Thread Paul Durrant
ngy...@amazon.com; Jan Beulich > ; Volodymyr Babchuk > ; Roger Pau Monné > Subject: [Xen-devel] [PATCH 1/2] xen/mm: fold PGC_broken into PGC_state bits > > From: David Woodhouse > > Only PGC_state_offlining and PGC_state_offlined are valid in conjunction > with PGC_broken. The othe

[Xen-devel] [PATCH 1/2] xen/mm: fold PGC_broken into PGC_state bits

2020-03-19 Thread David Woodhouse
From: David Woodhouse Only PGC_state_offlining and PGC_state_offlined are valid in conjunction with PGC_broken. The other two states (free and inuse) were never valid for a broken page. By folding PGC_broken in, we can have three bits for PGC_state which allows up to 8 states, of which 6 are cur

Re: [Xen-devel] [PATCH 1/2] xen/mm: fold PGC_broken into PGC_state bits

2020-03-19 Thread Jan Beulich
On 19.03.2020 14:54, David Woodhouse wrote: > On Thu, 2020-03-19 at 12:59 +0100, Jan Beulich wrote: >>> Read that message again from the point of view of a contributor. >>> Pretend it isn't even me; pretend it's someone attempting to make >>> their first, trivial, improvement to the Xen ecosystem.

Re: [Xen-devel] [PATCH 1/2] xen/mm: fold PGC_broken into PGC_state bits

2020-03-19 Thread David Woodhouse
On Thu, 2020-03-19 at 12:59 +0100, Jan Beulich wrote: > > Read that message again from the point of view of a contributor. > > Pretend it isn't even me; pretend it's someone attempting to make > > their first, trivial, improvement to the Xen ecosystem. > > > > I hope you'll understand why my initi

Re: [Xen-devel] [PATCH 1/2] xen/mm: fold PGC_broken into PGC_state bits

2020-03-19 Thread Jan Beulich
On 19.03.2020 11:26, David Woodhouse wrote: > On Thu, 2020-03-19 at 09:49 +0100, Jan Beulich wrote: >> On 18.03.2020 18:13, David Woodhouse wrote: >>> The -MP makefile patch I posted yesterday... I almost didn't bother. >>> And when I allowed myself to be talked into it, I was entirely >>> unsurpri

Re: [Xen-devel] [PATCH 1/2] xen/mm: fold PGC_broken into PGC_state bits

2020-03-19 Thread David Woodhouse
On Thu, 2020-03-19 at 09:49 +0100, Jan Beulich wrote: > On 18.03.2020 18:13, David Woodhouse wrote: > > On Wed, 2020-03-18 at 12:31 +, Julien Grall wrote: > > > On 18/03/2020 09:56, Jan Beulich wrote: > > > > On 17.03.2020 22:52, David Woodhouse wrote: > > > > > On Thu, 2020-02-20 at 12:10 +010

Re: [Xen-devel] [PATCH 1/2] xen/mm: fold PGC_broken into PGC_state bits

2020-03-19 Thread Jan Beulich
On 18.03.2020 18:13, David Woodhouse wrote: > On Wed, 2020-03-18 at 12:31 +, Julien Grall wrote: >> On 18/03/2020 09:56, Jan Beulich wrote: >>> On 17.03.2020 22:52, David Woodhouse wrote: On Thu, 2020-02-20 at 12:10 +0100, Jan Beulich wrote: >> @@ -1699,14 +1714,14 @@ unsigned int onli

Re: [Xen-devel] [PATCH 1/2] xen/mm: fold PGC_broken into PGC_state bits

2020-03-18 Thread David Woodhouse
On Wed, 2020-03-18 at 12:31 +, Julien Grall wrote: > On 18/03/2020 09:56, Jan Beulich wrote: > > On 17.03.2020 22:52, David Woodhouse wrote: > > > On Thu, 2020-02-20 at 12:10 +0100, Jan Beulich wrote: > > > > > @@ -1699,14 +1714,14 @@ unsigned int online_page(mfn_t mfn, > > > > > uint32_t *stat

Re: [Xen-devel] [PATCH 1/2] xen/mm: fold PGC_broken into PGC_state bits

2020-03-18 Thread Jan Beulich
On 18.03.2020 13:31, Julien Grall wrote: > On 18/03/2020 09:56, Jan Beulich wrote: >> On 17.03.2020 22:52, David Woodhouse wrote: >>> On Thu, 2020-02-20 at 12:10 +0100, Jan Beulich wrote: On 07.02.2020 16:57, David Woodhouse wrote: > +#define page_is_offlining(pg)  (page_state_is((pg),

Re: [Xen-devel] [PATCH 1/2] xen/mm: fold PGC_broken into PGC_state bits

2020-03-18 Thread Julien Grall
Hi Jan, On 18/03/2020 09:56, Jan Beulich wrote: On 17.03.2020 22:52, David Woodhouse wrote: On Thu, 2020-02-20 at 12:10 +0100, Jan Beulich wrote: On 07.02.2020 16:57, David Woodhouse wrote: @@ -1145,16 +1145,19 @@ static int reserve_offlined_page(struct page_info *head)   for ( cur_head =

Re: [Xen-devel] [PATCH 1/2] xen/mm: fold PGC_broken into PGC_state bits

2020-03-18 Thread Jan Beulich
On 17.03.2020 22:52, David Woodhouse wrote: On Thu, 2020-02-20 at 12:10 +0100, Jan Beulich wrote: On 07.02.2020 16:57, David Woodhouse wrote: @@ -1145,16 +1145,19 @@ static int reserve_offlined_page(struct page_info *head) for ( cur_head = head; cur_head < head + ( 1UL << head_order);

Re: [Xen-devel] [PATCH 1/2] xen/mm: fold PGC_broken into PGC_state bits

2020-03-17 Thread David Woodhouse
On Thu, 2020-02-20 at 12:10 +0100, Jan Beulich wrote: > On 07.02.2020 16:57, David Woodhouse wrote: > > @@ -1145,16 +1145,19 @@ static int reserve_offlined_page(struct > > page_info *head) > > > > for ( cur_head = head; cur_head < head + ( 1UL << head_order); > > cur_head++ ) > > { > >

Re: [Xen-devel] [PATCH 1/2] xen/mm: fold PGC_broken into PGC_state bits

2020-03-17 Thread David Woodhouse
On Fri, 2020-02-07 at 20:27 +, Julien Grall wrote: > > +switch ( x & PGC_state ) > > { > > -nx &= ~PGC_state; > > -nx |= (((x & PGC_state) == PGC_state_free) > > - ? PGC_state_offlined : PGC_state_offlining); > > -} > > +

Re: [Xen-devel] [PATCH 1/2] xen/mm: fold PGC_broken into PGC_state bits

2020-02-20 Thread Jan Beulich
On 07.02.2020 16:57, David Woodhouse wrote: > @@ -1145,16 +1145,19 @@ static int reserve_offlined_page(struct page_info > *head) > > for ( cur_head = head; cur_head < head + ( 1UL << head_order); > cur_head++ ) > { > -if ( !page_state_is(cur_head, offlined) ) > +struct

Re: [Xen-devel] [PATCH 1/2] xen/mm: fold PGC_broken into PGC_state bits

2020-02-09 Thread Julien Grall
On 09/02/2020 13:22, David Woodhouse wrote: On Fri, 2020-02-07 at 20:27 +, Julien Grall wrote: Could you please send the series in a separate thread? So we don't mix the two discussions (i.e merge and free on boot allocated page) together. Well, they're all part of the same mess, really.

Re: [Xen-devel] [PATCH 1/2] xen/mm: fold PGC_broken into PGC_state bits

2020-02-09 Thread David Woodhouse
On Fri, 2020-02-07 at 20:27 +, Julien Grall wrote: > Could you please send the series in a separate thread? So we don't mix > the two discussions (i.e merge and free on boot allocated page) together. Well, they're all part of the same mess, really. There are cases where pages end up in free_

Re: [Xen-devel] [PATCH 1/2] xen/mm: fold PGC_broken into PGC_state bits

2020-02-07 Thread Julien Grall
Hi David, Could you please send the series in a separate thread? So we don't mix the two discussions (i.e merge and free on boot allocated page) together. On 07/02/2020 15:57, David Woodhouse wrote: From: David Woodhouse Only PGC_state_offlining and PGC_state_offlined are valid in conjuncti

[Xen-devel] [PATCH 1/2] xen/mm: fold PGC_broken into PGC_state bits

2020-02-07 Thread David Woodhouse
From: David Woodhouse Only PGC_state_offlining and PGC_state_offlined are valid in conjunction with PGC_broken. The other two states (free and inuse) were never valid for a broken page. By folding PGC_broken in, we can have three bits for PGC_state which allows up to 8 states, of which 6 are cur