From patchwork Fri Jan 24 11:40:14 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: 11350109 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2A556139A for ; Fri, 24 Jan 2020 11:40:39 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 088D420708 for ; Fri, 24 Jan 2020 11:40:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="BLHOFG5i" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 088D420708 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fBu5P9PuWyVB38uP0Um5ZriQDoJKHmS/un+Q3IWYSRE=; b=BLHOFG5ibVFQLT 3oDv9SuW/5Dz/zCBtCFGDlCCg37VJUPoA9m70gaj5pnLw0sHioKYGN9l4EuLg/aryaeZTNQUOmq55 LA8nHk8jBJHvobsrqHPuVsdKY4VWbwyIKrGZYxKK6ur0c3yywfalTW7mSZwWq8CYqoIOniyR1ptsP WY5ynkm5Qfmn8KTuHGQD8Zh1dYmDDsHq5uYGUjjp8A7rghnU3cC/uFbrpIgmWhBYlpicEzB8mNIjl Rs8wXaYDrQcmDlazNbOu2sFtZ1bn94Ix1mYSlTfiAHSX5sCnDGv0bOVUaqo8UeX3IkW3Pu0YOkg7h D0id3T4Rs4IIy7oE17kA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iuxKF-0004HO-VM; Fri, 24 Jan 2020 11:40:35 +0000 Received: from mx2.suse.de ([195.135.220.15]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iuxKD-0004Fg-A3; Fri, 24 Jan 2020 11:40:34 +0000 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_Koutn=C3=BD?= To: cgroups@vger.kernel.org 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200124_034033_492975_E5599820 X-CRM114-Status: UNSURE ( 9.65 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [195.135.220.15 listed in wl.mailspike.net] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linger.lee@mediatek.com, tomcherry@google.com, shuah@kernel.org, linux-kernel@vger.kernel.org, surenb@google.com, tj@kernel.org, lizefan@huawei.com, linux-mediatek@lists.infradead.org, linux-kselftest@vger.kernel.org, hannes@cmpxchg.org, matthias.bgg@gmail.com, alex.shi@linux.alibaba.com, kernel-team@android.com, guro@fb.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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(-)