From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751233AbdAYCCY (ORCPT ); Tue, 24 Jan 2017 21:02:24 -0500 Received: from mail-qt0-f195.google.com ([209.85.216.195]:36499 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751113AbdAYCCW (ORCPT ); Tue, 24 Jan 2017 21:02:22 -0500 Date: Tue, 24 Jan 2017 21:02:20 -0500 From: Tejun Heo To: Mel Gorman 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: <20170125020220.GA2727@mtj.duckdns.org> References: <20170117092954.15413-1-mgorman@techsingularity.net> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170124235457.x7ssjun5ht2ycyac@techsingularity.net> User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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