From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753520AbdEQVkk (ORCPT ); Wed, 17 May 2017 17:40:40 -0400 Received: from mail-yw0-f196.google.com ([209.85.161.196]:36089 "EHLO mail-yw0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753010AbdEQVkh (ORCPT ); Wed, 17 May 2017 17:40:37 -0400 Date: Wed, 17 May 2017 17:40:34 -0400 From: Tejun Heo To: Waiman Long Cc: Li Zefan , Johannes Weiner , Peter Zijlstra , Ingo Molnar , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, kernel-team@fb.com, pjt@google.com, luto@amacapital.net, efault@gmx.de Subject: Re: [RFC PATCH v2 09/17] cgroup: Keep accurate count of tasks in each css_set Message-ID: <20170517214034.GF942@htj.duckdns.org> References: <1494855256-12558-1-git-send-email-longman@redhat.com> <1494855256-12558-10-git-send-email-longman@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1494855256-12558-10-git-send-email-longman@redhat.com> User-Agent: Mutt/1.8.2 (2017-04-18) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Mon, May 15, 2017 at 09:34:08AM -0400, Waiman Long wrote: > The reference count in the css_set data structure was used as a > proxy of the number of tasks attached to that css_set. However, that > count is actually not an accurate measure especially with thread mode > support. So a new variable task_count is added to the css_set to keep > track of the actual task count. This new variable is protected by > the css_set_lock. Functions that require the actual task count are > updated to use the new variable. > > Signed-off-by: Waiman Long Looks good. We probably should replace css_set_populated() to use this too. Thanks. -- tejun