From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751399AbdAYIbD (ORCPT ); Wed, 25 Jan 2017 03:31:03 -0500 Received: from outbound-smtp02.blacknight.com ([81.17.249.8]:48421 "EHLO outbound-smtp02.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750905AbdAYIbB (ORCPT ); Wed, 25 Jan 2017 03:31:01 -0500 Date: Wed, 25 Jan 2017 08:30:58 +0000 From: Mel Gorman To: Tejun Heo Cc: Vlastimil Babka , Andrew Morton , Linux Kernel , Linux-MM , Hillf Danton , Jesper Dangaard Brouer , Petr Mladek Subject: Re: [PATCH 3/4] mm, page_alloc: Drain per-cpu pages from workqueue context Message-ID: <20170125083058.g2f4i5ej2ayljcmb@techsingularity.net> References: <20170117092954.15413-4-mgorman@techsingularity.net> <06c39883-eff5-1412-a148-b063aa7bcc5f@suse.cz> <20170120152606.w3hb53m2w6thzsqq@techsingularity.net> <20170123170329.GA7820@htj.duckdns.org> <20170123200412.mkesardc4mckk6df@techsingularity.net> <20170123205501.GA25944@htj.duckdns.org> <20170123230429.os7ssxab4mazrkrb@techsingularity.net> <20170124160722.GC12281@htj.duckdns.org> <20170124235457.x7ssjun5ht2ycyac@techsingularity.net> <20170125020220.GA2727@mtj.duckdns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20170125020220.GA2727@mtj.duckdns.org> User-Agent: Mutt/1.6.2 (2016-07-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 24, 2017 at 09:02:20PM -0500, Tejun Heo wrote: > Hello, > > On Tue, Jan 24, 2017 at 11:54:57PM +0000, Mel Gorman wrote: > > @@ -2402,24 +2415,16 @@ void drain_all_pages(struct zone *zone) > > cpumask_clear_cpu(cpu, &cpus_with_pcps); > > } > > > > + for_each_cpu(cpu, &cpus_with_pcps) { > > + struct work_struct *work = per_cpu_ptr(&pcpu_drain, cpu); > > + INIT_WORK(work, drain_local_pages_wq); > > + schedule_work_on(cpu, work); > > } > > + for_each_cpu(cpu, &cpus_with_pcps) > > + flush_work(per_cpu_ptr(&pcpu_drain, cpu)); > > + > > put_online_cpus(); > > + mutex_unlock(&pcpu_drain_mutex); > > Looks good to me. > Thanks Tejun. -- Mel Gorman SUSE Labs