Re: [Xen-devel] [PATCH v5 3/8] mm: Scrub pages in alloc_heap_pages() if needed

2017-07-31 Thread Boris Ostrovsky
On 07/31/2017 11:16 AM, Jan Beulich wrote: Boris Ostrovsky 07/23/17 4:07 AM >>> >> On 06/27/2017 02:00 PM, Jan Beulich wrote: >> Boris Ostrovsky 06/22/17 8:55 PM >>> @@ -862,10 +879,19 @@ static struct page_info

Re: [Xen-devel] [PATCH v5 3/8] mm: Scrub pages in alloc_heap_pages() if needed

2017-07-31 Thread Jan Beulich
>>> Boris Ostrovsky 07/23/17 4:07 AM >>> >On 06/27/2017 02:00 PM, Jan Beulich wrote: > Boris Ostrovsky 06/22/17 8:55 PM >>> >>> @@ -862,10 +879,19 @@ static struct page_info *alloc_heap_pages( >>> if ( d != NULL ) >>>

Re: [Xen-devel] [PATCH v5 3/8] mm: Scrub pages in alloc_heap_pages() if needed

2017-07-22 Thread Boris Ostrovsky
On 06/27/2017 02:00 PM, Jan Beulich wrote: Boris Ostrovsky 06/22/17 8:55 PM >>> @@ -862,10 +879,19 @@ static struct page_info *alloc_heap_pages( if ( d != NULL ) d->last_alloc_node = node; +need_scrub = !!first_dirty_pg && !(memflags &

Re: [Xen-devel] [PATCH v5 3/8] mm: Scrub pages in alloc_heap_pages() if needed

2017-06-27 Thread Jan Beulich
>>> Boris Ostrovsky 06/22/17 8:55 PM >>> > @@ -862,10 +879,19 @@ static struct page_info *alloc_heap_pages( > if ( d != NULL ) > d->last_alloc_node = node; > > +need_scrub = !!first_dirty_pg && !(memflags & MEMF_no_scrub); No need for !! here. But

[Xen-devel] [PATCH v5 3/8] mm: Scrub pages in alloc_heap_pages() if needed

2017-06-22 Thread Boris Ostrovsky
When allocating pages in alloc_heap_pages() first look for clean pages. If none is found then retry, take pages marked as unscrubbed and scrub them. Note that we shouldn't find unscrubbed pages in alloc_heap_pages() yet. However, this will become possible when we stop scrubbing from