Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp9158991ybl; Fri, 17 Jan 2020 07:16:51 -0800 (PST) X-Google-Smtp-Source: APXvYqwqg8cMOn1smjVVjF1j4DxW+dQHad/4577mAlvJkjHj6UeTByxphjnrkGzy5M+24J9FN1EU X-Received: by 2002:a05:6808:486:: with SMTP id z6mr3812045oid.117.1579274211207; Fri, 17 Jan 2020 07:16:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579274211; cv=none; d=google.com; s=arc-20160816; b=G40HD6Q6hH4H+A9NlDQ4gASHxrF+WPMYLO4clyBYgRSkisyD1wGh4/K7YSPYdgIYWs NXsJpstTauz7ZbaGVQcnxMCB9NOcOCysMTuw66DLL95OF39wp1f8CZ+E38v7Cpp/xW8o MdY64+392pyweC1wkj+1MNIqVJadz1m7Yln/PQ3qT5k+68bWUqPXRn1HymgucxMDLBVr mRQx2jEzuXiBZNuelhuXywOcL/bkwOxI6BmgcG9ZrX2oXbwvreEd8EDBmh/xRlwg38MJ dpM0Ze0zLPzIEFTFO2ozOhgU6D1bl2cvOFYM0IG32zcUmuq3Ohcw1m4XLSL37nOLiSE4 kX6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=GsOZV5N4Siiyng3xAPdqaXPNp81uIa/+Z7RZyjqoeuY=; b=tyaVld34xYCXtcix4x8tI4bncK0MnJN0LvG4fZspBfYKWuhr0codapkeHJa/e+9/a4 PL/4oZnxORd8odhDEJwgmqBB5/vdgSUgGIo4ST0dOfaP75LO7h1UR2UTrplC61t0wY2z tmNervO8o9c2X1sR8qfpkmuyhVHaAbEIQwb4EgrKhFuiDe8ZW20K+2G/YD1qXdr5pc6g SHPo8gJQoAOeInaRawqctF7L5TGnri3p9Hn/0cROumUqBpM7sX3GZHdlVW0b4RLnXAOc sakoE3Ndp2LT0rChB2XlYDiv+PxpU0dgCdxfao8bIeYNMYpBOSUGwGuH7Bm1vA6gMu7/ +jOA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z11si13627926oic.176.2020.01.17.07.16.39; Fri, 17 Jan 2020 07:16:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729015AbgAQPPp (ORCPT + 99 others); Fri, 17 Jan 2020 10:15:45 -0500 Received: from mx2.suse.de ([195.135.220.15]:59930 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728739AbgAQPPp (ORCPT ); Fri, 17 Jan 2020 10:15:45 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 899D9AE2C; Fri, 17 Jan 2020 15:15:42 +0000 (UTC) From: =?UTF-8?q?Michal=20Koutn=C3=BD?= To: cgroups@vger.kernel.org Cc: Johannes Weiner , Li Zefan , Tejun Heo , alex.shi@linux.alibaba.com, guro@fb.com, kernel-team@android.com, linger.lee@mediatek.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-mediatek@lists.infradead.org, matthias.bgg@gmail.com, shuah@kernel.org, tomcherry@google.com Subject: [PATCH 0/3] cgroup: Iterate tasks that did not finish do_exit() Date: Fri, 17 Jan 2020 16:15:30 +0100 Message-Id: <20200117151533.12381-1-mkoutny@suse.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200116043612.52782-1-surenb@google.com> References: <20200116043612.52782-1-surenb@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, I was looking into the issue and came up with an alternative solution that changes task iteration to be consistent with cgroup_is_populated() check and moving the responsibility to check PF_EXITING on the consumers of iterator API. I haven't check your approach thoroughly, however, it appears to me it complicates (already non-trivial) cgroup destruction path. I ran your selftest on the iterators approach and it proved working. Michal Koutný (2): cgroup: Unify css_set task lists cgroup: Iterate tasks that did not finish do_exit() Suren Baghdasaryan (1): kselftest/cgroup: add cgroup destruction test include/linux/cgroup-defs.h | 15 ++- include/linux/cgroup.h | 4 +- kernel/cgroup/cgroup.c | 86 ++++++++-------- kernel/cgroup/debug.c | 16 ++- tools/testing/selftests/cgroup/test_core.c | 113 +++++++++++++++++++++ 5 files changed, 176 insertions(+), 58 deletions(-) -- 2.24.1