From patchwork Fri Jan 17 15:15:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Michal_Koutn=C3=BD?= X-Patchwork-Id: 208923 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DC82C33CB1 for ; Fri, 17 Jan 2020 15:15:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 733C92072E for ; Fri, 17 Jan 2020 15:15:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728884AbgAQPPp (ORCPT ); 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_Koutn=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 Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@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(-)