From mboxrd@z Thu Jan 1 00:00:00 1970 From: Li Zefan Subject: Re: [PATCH 10/13] cpuset: make CPU / memory hotplug propagation asynchronous Date: Sun, 6 Jan 2013 16:29:09 +0800 Message-ID: <50E935D5.4040402@huawei.com> References: <1357248967-24959-1-git-send-email-tj@kernel.org> <1357248967-24959-11-git-send-email-tj@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1357248967-24959-11-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Tejun Heo Cc: paul-inf54ven1CmVyaH7bEyXVA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, mhocko-AlSwsSmVLrQ@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org > +static void schedule_cpuset_propagate_hotplug(struct cpuset *cs) > +{ > + /* > + * Pin @cs. The refcnt will be released when the work item > + * finishes executing. > + */ > + if (!css_tryget(&cs->css)) > + return; > + > + /* > + * Queue @cs->empty_cpuset_work. If already pending, lose the css cs->hotplug_work > + * ref. cpuset_propagate_hotplug_wq is ordered and propagation > + * will happen in the order this function is called. > + */ > + if (!queue_work(cpuset_propagate_hotplug_wq, &cs->hotplug_work)) > + css_put(&cs->css); > } From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx132.postini.com [74.125.245.132]) by kanga.kvack.org (Postfix) with SMTP id F121A6B0071 for ; Sun, 6 Jan 2013 03:30:26 -0500 (EST) Message-ID: <50E935D5.4040402@huawei.com> Date: Sun, 6 Jan 2013 16:29:09 +0800 From: Li Zefan MIME-Version: 1.0 Subject: Re: [PATCH 10/13] cpuset: make CPU / memory hotplug propagation asynchronous References: <1357248967-24959-1-git-send-email-tj@kernel.org> <1357248967-24959-11-git-send-email-tj@kernel.org> In-Reply-To: <1357248967-24959-11-git-send-email-tj@kernel.org> Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Tejun Heo Cc: paul@paulmenage.org, glommer@parallels.com, containers@lists.linux-foundation.org, cgroups@vger.kernel.org, peterz@infradead.org, mhocko@suse.cz, bsingharora@gmail.com, hannes@cmpxchg.org, kamezawa.hiroyu@jp.fujitsu.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org > +static void schedule_cpuset_propagate_hotplug(struct cpuset *cs) > +{ > + /* > + * Pin @cs. The refcnt will be released when the work item > + * finishes executing. > + */ > + if (!css_tryget(&cs->css)) > + return; > + > + /* > + * Queue @cs->empty_cpuset_work. If already pending, lose the css cs->hotplug_work > + * ref. cpuset_propagate_hotplug_wq is ordered and propagation > + * will happen in the order this function is called. > + */ > + if (!queue_work(cpuset_propagate_hotplug_wq, &cs->hotplug_work)) > + css_put(&cs->css); > } -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751716Ab3AFIaA (ORCPT ); Sun, 6 Jan 2013 03:30:00 -0500 Received: from szxga02-in.huawei.com ([119.145.14.65]:18428 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751207Ab3AFI34 (ORCPT ); Sun, 6 Jan 2013 03:29:56 -0500 Message-ID: <50E935D5.4040402@huawei.com> Date: Sun, 6 Jan 2013 16:29:09 +0800 From: Li Zefan User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Tejun Heo CC: , , , , , , , , , , Subject: Re: [PATCH 10/13] cpuset: make CPU / memory hotplug propagation asynchronous References: <1357248967-24959-1-git-send-email-tj@kernel.org> <1357248967-24959-11-git-send-email-tj@kernel.org> In-Reply-To: <1357248967-24959-11-git-send-email-tj@kernel.org> Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.135.68.215] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +static void schedule_cpuset_propagate_hotplug(struct cpuset *cs) > +{ > + /* > + * Pin @cs. The refcnt will be released when the work item > + * finishes executing. > + */ > + if (!css_tryget(&cs->css)) > + return; > + > + /* > + * Queue @cs->empty_cpuset_work. If already pending, lose the css cs->hotplug_work > + * ref. cpuset_propagate_hotplug_wq is ordered and propagation > + * will happen in the order this function is called. > + */ > + if (!queue_work(cpuset_propagate_hotplug_wq, &cs->hotplug_work)) > + css_put(&cs->css); > }