Re: [Xen-devel] [PATCH v4 4/8] mm: Scrub memory from idle loop

2017-06-14 Thread Jan Beulich
>>> On 13.06.17 at 20:39, wrote: > On 06/13/2017 04:19 AM, Jan Beulich wrote: > On 12.06.17 at 23:28, wrote: >>> On Mon, 2017-06-12 at 13:01 -0400, Boris Ostrovsky wrote: On 06/12/2017 04:08 AM, Jan Beulich wrote: On 19.05.17 at 17:50, wrote: >> Instead of scrubbing pages d

Re: [Xen-devel] [PATCH v4 4/8] mm: Scrub memory from idle loop

2017-06-14 Thread Jan Beulich
>>> On 13.06.17 at 20:20, wrote: > +if ( node_need_scrub[node] ) > +{ > +if ( !get_node ) > +return node; > + > +dist = __node_distance(local_node, node); > +if ( dist < shortest || closest == NUMA_NO_

Re: [Xen-devel] [PATCH v4 4/8] mm: Scrub memory from idle loop

2017-06-13 Thread Boris Ostrovsky
On 06/13/2017 04:36 PM, Dario Faggioli wrote: > On Tue, 2017-06-13 at 14:39 -0400, Boris Ostrovsky wrote: >> On 06/13/2017 04:19 AM, Jan Beulich wrote: >> On 12.06.17 at 23:28, wrote: If some vcpu context work is scheduled, SCHEDULE_SOFTIRQ is raised. do_softirq() will call the

Re: [Xen-devel] [PATCH v4 4/8] mm: Scrub memory from idle loop

2017-06-13 Thread Dario Faggioli
On Tue, 2017-06-13 at 14:39 -0400, Boris Ostrovsky wrote: > On 06/13/2017 04:19 AM, Jan Beulich wrote: > > > > > On 12.06.17 at 23:28, wrote: > > > If some vcpu context work is scheduled, SCHEDULE_SOFTIRQ is > > > raised. > > > do_softirq() will call the scheduler, which will see that there > > >

Re: [Xen-devel] [PATCH v4 4/8] mm: Scrub memory from idle loop

2017-06-13 Thread Boris Ostrovsky
On 06/13/2017 04:19 AM, Jan Beulich wrote: On 12.06.17 at 23:28, wrote: >> On Mon, 2017-06-12 at 13:01 -0400, Boris Ostrovsky wrote: >>> On 06/12/2017 04:08 AM, Jan Beulich wrote: >>> On 19.05.17 at 17:50, wrote: > Instead of scrubbing pages during guest destruction (from > free_

Re: [Xen-devel] [PATCH v4 4/8] mm: Scrub memory from idle loop

2017-06-13 Thread Boris Ostrovsky
+if ( node_need_scrub[node] ) +{ +if ( !get_node ) +return node; + +dist = __node_distance(local_node, node); +if ( dist < shortest || closest == NUMA_NO_NODE ) +{ +

Re: [Xen-devel] [PATCH v4 4/8] mm: Scrub memory from idle loop

2017-06-13 Thread Jan Beulich
>>> On 12.06.17 at 23:28, wrote: > On Mon, 2017-06-12 at 13:01 -0400, Boris Ostrovsky wrote: >> On 06/12/2017 04:08 AM, Jan Beulich wrote: >> > > > > On 19.05.17 at 17:50, wrote: >> > > >> > > Instead of scrubbing pages during guest destruction (from >> > > free_heap_pages()) do this opportunist

Re: [Xen-devel] [PATCH v4 4/8] mm: Scrub memory from idle loop

2017-06-13 Thread Jan Beulich
>>> On 12.06.17 at 19:01, wrote: > On 06/12/2017 04:08 AM, Jan Beulich wrote: > On 19.05.17 at 17:50, wrote: >>> Instead of scrubbing pages during guest destruction (from >>> free_heap_pages()) do this opportunistically, from the idle loop. >> This is too brief for my taste. In particular the

Re: [Xen-devel] [PATCH v4 4/8] mm: Scrub memory from idle loop

2017-06-12 Thread Dario Faggioli
On Mon, 2017-06-12 at 13:01 -0400, Boris Ostrovsky wrote: > On 06/12/2017 04:08 AM, Jan Beulich wrote: > > > > > On 19.05.17 at 17:50, wrote: > > > > > > Instead of scrubbing pages during guest destruction (from > > > free_heap_pages()) do this opportunistically, from the idle loop. > > > > This

Re: [Xen-devel] [PATCH v4 4/8] mm: Scrub memory from idle loop

2017-06-12 Thread Boris Ostrovsky
On 06/12/2017 04:08 AM, Jan Beulich wrote: On 19.05.17 at 17:50, wrote: >> Instead of scrubbing pages during guest destruction (from >> free_heap_pages()) do this opportunistically, from the idle loop. > This is too brief for my taste. In particular the re-ordering ... > >> --- a/xen/arch/x86

Re: [Xen-devel] [PATCH v4 4/8] mm: Scrub memory from idle loop

2017-06-12 Thread Jan Beulich
>>> On 19.05.17 at 17:50, wrote: > Instead of scrubbing pages during guest destruction (from > free_heap_pages()) do this opportunistically, from the idle loop. This is too brief for my taste. In particular the re-ordering ... > --- a/xen/arch/x86/domain.c > +++ b/xen/arch/x86/domain.c > @@ -118

[Xen-devel] [PATCH v4 4/8] mm: Scrub memory from idle loop

2017-05-19 Thread Boris Ostrovsky
Instead of scrubbing pages during guest destruction (from free_heap_pages()) do this opportunistically, from the idle loop. Signed-off-by: Boris Ostrovsky --- Changes in v4: * Be careful with tasklets in idle_loop() * Use per-cpu mapcache override * Update node_to_scrub() algorithm to select clos