Re: [Xen-devel] [PATCH v6 1/8] mm: Place unscrubbed pages at the end of pagelist

2017-08-07 Thread Boris Ostrovsky
>> >> Switching to bitfields was, btw, suggested by Jan at some point so if >> the two of you agree on how to proceed I can go either way (but by >> preference is to keep it as a single-bit bitfield). > > If you use a single-bit bitfield of bool (i.e bool need_flush : 1) you > would address both

Re: [Xen-devel] [PATCH v6 1/8] mm: Place unscrubbed pages at the end of pagelist

2017-08-07 Thread Julien Grall
On 07/08/17 17:57, Boris Ostrovsky wrote: diff --git a/xen/include/asm-arm/mm.h b/xen/include/asm-arm/mm.h index ef84b72..d26b232 100644 --- a/xen/include/asm-arm/mm.h +++ b/xen/include/asm-arm/mm.h @@ -44,7 +44,16 @@ struct page_info /* Page is on a free list: ((count_info &

Re: [Xen-devel] [PATCH v6 1/8] mm: Place unscrubbed pages at the end of pagelist

2017-08-07 Thread Boris Ostrovsky
>>> diff --git a/xen/include/asm-arm/mm.h b/xen/include/asm-arm/mm.h index ef84b72..d26b232 100644 --- a/xen/include/asm-arm/mm.h +++ b/xen/include/asm-arm/mm.h @@ -44,7 +44,16 @@ struct page_info /* Page is on a free list: ((count_info & PGC_count_mask) ==

Re: [Xen-devel] [PATCH v6 1/8] mm: Place unscrubbed pages at the end of pagelist

2017-08-07 Thread Jan Beulich
>>> Boris Ostrovsky 08/07/17 4:56 PM >>> >On 08/07/2017 10:37 AM, Jan Beulich wrote: >> Boris Ostrovsky 08/07/17 4:16 PM >>> >>> On 08/06/2017 01:41 PM, Jan Beulich wrote: >>> Boris Ostrovsky 08/04/17

Re: [Xen-devel] [PATCH v6 1/8] mm: Place unscrubbed pages at the end of pagelist

2017-08-07 Thread Julien Grall
Hi, On 07/08/17 15:46, Boris Ostrovsky wrote: On 08/07/2017 06:45 AM, Julien Grall wrote: Hi Boris, I would have appreciated to be CCed as maintainer of the ARM bits... Please use scripts/get_maintainers.pl in the future. Ugh, sorry about that. (I did test builds for both ARM64 and ARM32,

Re: [Xen-devel] [PATCH v6 1/8] mm: Place unscrubbed pages at the end of pagelist

2017-08-07 Thread Boris Ostrovsky
On 08/07/2017 10:37 AM, Jan Beulich wrote: > Boris Ostrovsky 08/07/17 4:16 PM >>> >> On 08/06/2017 01:41 PM, Jan Beulich wrote: >> Boris Ostrovsky 08/04/17 7:03 PM >>> +/* See if any of the pages indeed need

Re: [Xen-devel] [PATCH v6 1/8] mm: Place unscrubbed pages at the end of pagelist

2017-08-07 Thread Boris Ostrovsky
On 08/07/2017 06:45 AM, Julien Grall wrote: > Hi Boris, > > I would have appreciated to be CCed as maintainer of the ARM bits... > Please use scripts/get_maintainers.pl in the future. Ugh, sorry about that. (I did test builds for both ARM64 and ARM32, if this make my transgression any less

Re: [Xen-devel] [PATCH v6 1/8] mm: Place unscrubbed pages at the end of pagelist

2017-08-07 Thread Jan Beulich
Boris Ostrovsky 08/07/17 4:16 PM >>> >On 08/06/2017 01:41 PM, Jan Beulich wrote: > Boris Ostrovsky 08/04/17 7:03 PM >>> >>> +/* See if any of the pages indeed need scrubbing. */ >>> +if ( first_dirty

Re: [Xen-devel] [PATCH v6 1/8] mm: Place unscrubbed pages at the end of pagelist

2017-08-07 Thread Boris Ostrovsky
On 08/06/2017 01:41 PM, Jan Beulich wrote: Boris Ostrovsky 08/04/17 7:03 PM >>> >> @@ -873,6 +916,8 @@ static int reserve_offlined_page(struct page_info *head) > > >> while ( cur_order < head_order ) >> { >> +unsigned int idx = INVALID_DIRTY_IDX; > Is

Re: [Xen-devel] [PATCH v6 1/8] mm: Place unscrubbed pages at the end of pagelist

2017-08-07 Thread Julien Grall
Hi Boris, I would have appreciated to be CCed as maintainer of the ARM bits... Please use scripts/get_maintainers.pl in the future. On 04/08/17 18:05, Boris Ostrovsky wrote: . so that it's easy to find pages that need to be scrubbed (those pages are Pointless . diff --git

Re: [Xen-devel] [PATCH v6 1/8] mm: Place unscrubbed pages at the end of pagelist

2017-08-06 Thread Jan Beulich
>>> Boris Ostrovsky 08/04/17 7:03 PM >>> >@@ -873,6 +916,8 @@ static int reserve_offlined_page(struct page_info *head) > >while ( cur_order < head_order ) >{ >+unsigned int idx = INVALID_DIRTY_IDX; Is it correct for the variable to live in this scope,

[Xen-devel] [PATCH v6 1/8] mm: Place unscrubbed pages at the end of pagelist

2017-08-04 Thread Boris Ostrovsky
. so that it's easy to find pages that need to be scrubbed (those pages are now marked with _PGC_need_scrub bit). We keep track of the first unscrubbed page in a page buddy using first_dirty field. For now it can have two values, 0 (whole buddy needs scrubbing) or INVALID_DIRTY_IDX (the buddy