From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751823AbbINUtN (ORCPT ); Mon, 14 Sep 2015 16:49:13 -0400 Received: from mail-qk0-f172.google.com ([209.85.220.172]:36651 "EHLO mail-qk0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750951AbbINUtL (ORCPT ); Mon, 14 Sep 2015 16:49:11 -0400 Date: Mon, 14 Sep 2015 16:49:07 -0400 From: Tejun Heo To: lizefan@huawei.com Cc: cgroups@vger.kernel.org, hannes@cmpxchg.org, mhocko@suse.cz, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/5] cgroup, memcg, cpuset: implement cgroup_taskset_for_each_leader() Message-ID: <20150914204907.GI25369@htj.duckdns.org> References: <1441998022-12953-1-git-send-email-tj@kernel.org> <1441998022-12953-3-git-send-email-tj@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1441998022-12953-3-git-send-email-tj@kernel.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 11, 2015 at 03:00:19PM -0400, Tejun Heo wrote: > It wasn't explicitly documented but, when a process is being migrated, > cpuset and memcg depend on cgroup_taskset_first() returning the > threadgroup leader; however, this approach is somewhat ghetto and > would no longer work for the planned multi-process migration. > > This patch introduces explicit cgroup_taskset_for_each_leader() which > iterates over only the threadgroup leaders and replaces > cgroup_taskset_first() usages for accessing the leader with it. > > This prepares both memcg and cpuset for multi-process migration. This > patch also updates the documentation for cgroup_taskset_for_each() to > clarify the iteration rules and removes comments mentioning task > ordering in tasksets. > > v2: A previous patch which added threadgroup leader test was dropped. > Patch updated accordingly. > > Signed-off-by: Tejun Heo > Acked-by: Zefan Li > Cc: Johannes Weiner > Cc: Michal Hocko Michal, if you're okay with this patch, I'll apply the patchset in cgroup/for-4.4. Thanks. -- tejun