Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp880627ybl; Fri, 24 Jan 2020 11:13:44 -0800 (PST) X-Google-Smtp-Source: APXvYqw6V+shRLnwdxXyvOiRpbLbnaLi84yYUbCYZfGb9pLyYXT0DYYgY7h6jCb4kCbjLQPtfyh5 X-Received: by 2002:a9d:811:: with SMTP id 17mr3912738oty.369.1579893224440; Fri, 24 Jan 2020 11:13:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579893224; cv=none; d=google.com; s=arc-20160816; b=TxCHhvSckCKT4CrUF/mqxxUnjNikRSFIAnNibqJpuBXLZxylgbElnET+KX+gvRU6Gx WE3RcHdUrongpTI9cSwOZJRsCUHUk7I6Hx22w0+j6OybVcJG2WB9oQHHtUjRR646pgfX 3bjNPOf/If6lPWP58UgycAyT0AcL9qXcqoTqWAMNc/z68gHFNoIqpcQpYqxZceZuMg4T mHGkRQ6c1nl8lo2j4YvVCkrAjLB4MWTtwQM83HVQUeHPxx7fab0BmfOM9bYLiAaB9Fnu qquIiIaVkLrKqsw4sAQnZglmhP/AhyYkxuphGEe1oMOp5UaPffIjFKF5LnRUREqnGP0B EnYw== 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=80TWg6OHRKHwN1hazHMHl17PNfwm+AsD3LSipjrWvEU=; b=ckE3UlbHF7mvWyJGWqIcGW0Hk2ZNreqyonfNmW3HCsEGSwfF/33P6+HuU04cIuD1bJ RMyRHO8cH9YqsbyTfhQVzaXQSRBvQE8g1yx0Pu/oa/lLLivGyTLRm7ogcs88rfwT8j34 NG9lC+0ZioR8PUV/5CJkiKWRlnbdWVUTwbJr90yJQnjZC/puOKWxKd06fpCLF+6VzZ94 bdBHwbOEMIGWruBsCSKcK1EUozEri6Yek08lNlc2/oY6/MbsU9fbecUvsXw8hZAXMSfn 2V0XNkY+Tc/9/LYjneBbGb2rAIzCVkG6dcUrQSinPs1GrHmqTBelV3viHzU2do8Zx/dr OPHw== 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 i140si203894oib.90.2020.01.24.11.13.32; Fri, 24 Jan 2020 11:13:44 -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 S2403856AbgAXLk5 (ORCPT + 99 others); Fri, 24 Jan 2020 06:40:57 -0500 Received: from mx2.suse.de ([195.135.220.15]:50758 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390760AbgAXLkc (ORCPT ); Fri, 24 Jan 2020 06:40:32 -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 75869ACB1; Fri, 24 Jan 2020 11:40:29 +0000 (UTC) From: =?UTF-8?q?Michal=20Koutn=C3=BD?= To: cgroups@vger.kernel.org Cc: alex.shi@linux.alibaba.com, guro@fb.com, hannes@cmpxchg.org, 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, lizefan@huawei.com, matthias.bgg@gmail.com, shuah@kernel.org, surenb@google.com, tj@kernel.org, tomcherry@google.com Subject: [PATCH v2 0/3] cgroup: Iterate tasks that did not finish do_exit() Date: Fri, 24 Jan 2020 12:40:14 +0100 Message-Id: <20200124114017.8363-1-mkoutny@suse.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200120145635.GA30904@blackbody.suse.cz> References: <20200120145635.GA30904@blackbody.suse.cz> 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, thanks for your feedback. I'm sending updated 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. Changes from v1 - v1: https://lore.kernel.org/lkml/20200117151533.12381-1-mkoutny@suse.com/ - Swap the fixing and refactoring patch (in order to make the fix easier for backport) - Don't introduce tasks lists array because of unnecessarily long access code - Fix comment in selftest - I leave the CC:stable on discretion of the maintainer Michal Koutný (2): cgroup: Iterate tasks that did not finish do_exit() cgroup: Clean up css_set task traversal Suren Baghdasaryan (1): kselftest/cgroup: add cgroup destruction test include/linux/cgroup.h | 4 +- kernel/cgroup/cgroup.c | 60 ++++++----- tools/testing/selftests/cgroup/test_core.c | 113 +++++++++++++++++++++ 3 files changed, 146 insertions(+), 31 deletions(-) -- 2.24.1