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); > }