Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp9297953ybl; Fri, 17 Jan 2020 09:31:47 -0800 (PST) X-Google-Smtp-Source: APXvYqwdjSDs6p1nzGPXupZ7GB+YdPf5iJ9aHcnbRO9BkIjsLeGEGiGW8RAc9M5ED4voTHeacZIx X-Received: by 2002:a05:6830:1607:: with SMTP id g7mr6881102otr.320.1579282306943; Fri, 17 Jan 2020 09:31:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579282306; cv=none; d=google.com; s=arc-20160816; b=PttaTtcSnkVWuZMzgh6Sepqri091gfBayZ0MWCbx8lMtve2aWk8fKB5YrR+iAyTfpn Hbugs4iy5Sq07sqSAf2VOKxhR5pPXNvrAJo6wCaIbrh34dZ0YgOJGiAZBD70wmYS7QH9 QLfpl4rxn3Aqnri9Fi6Kp3r0xyQhGSBSvA0rtPQhOsVSzVrMlXp63At+pkFydJorbanC wvyVSsf4/beW89t0QHdt9wYDmmgl8nXhpUPpE44Yt9xyXMoISXzY96NEx9pZncW+u8jJ aszP1VtmX2Qvd9a0ESlWeT9Hh+UjbHu4STjfz/9J+8s1OY0gDrhrdiGOa6WV4zKCHF6l Y7mw== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=s/Igl7jec5R8DMF3nyQFihy0XoNH7LpzgEc781wHBbE=; b=rJ+NYUM6SbGz1d9KdwBAgX/jwn/ompm20AK3b6Yf0Oy4iyjND9iQvuXwc0PQRSAQEc L49j0Ha67Z+pcHJdk+fBPvPWuPAjYLg+j/1HT6RLrS6uVQauCfqWH3a/EvHXnTp46N5e wCg3K7RHmh6Az5Sbf/S/kop29VYEtr6RDq+kCUjgXv2laGTIzw+s2IO91ONgr3en5XP8 5NTExQejBKJNk+U7BzJs0OSmJhzLLA6WYedi0u+onudEzbsVlk3UhESWb6Vf90iCGifv z8cznsNPp8i5JrbYF05is6/3jxd9pdlD/jE25xfNeq6h+7VNxNT+NkCmY1DOrKt1PwEu qldA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=IfI2V2Vj; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 9si12478848oiz.237.2020.01.17.09.31.34; Fri, 17 Jan 2020 09:31:46 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=IfI2V2Vj; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727573AbgAQRa3 (ORCPT + 99 others); Fri, 17 Jan 2020 12:30:29 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:53805 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726761AbgAQRa3 (ORCPT ); Fri, 17 Jan 2020 12:30:29 -0500 Received: by mail-wm1-f65.google.com with SMTP id m24so8214603wmc.3 for ; Fri, 17 Jan 2020 09:30:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=s/Igl7jec5R8DMF3nyQFihy0XoNH7LpzgEc781wHBbE=; b=IfI2V2VjiHDEyMxVeB6DJUwZfuJaVSwdWaVbiW2tG1VzG5iMe4Fmndr3Dh8Y5KaF7g SbVP5Ca373H4SpjZNwlaPj0ajlmO5/0RXj4cboBUBjlynN2ihp0sj5+LxlF9hYR3Gs5D 5Qv2rZh4Yzvc8lS4UP3Ac5LRe5cw1v+Y0yJdR8pwwdPPusdbhjfrDBsi13y8DYwoaakI cuAz6BXfPrsKPA1w9FiWbzNzE9zzgpb3Rr4pw20A0bJZFGooUMKUtslJ3QXvxVnMh650 IIszWgCEmch4wXJw0b3IsDeqswH27TUpZ2/KnyYvteCdFYD5butLob8faQQd6VS5iI6D fZyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=s/Igl7jec5R8DMF3nyQFihy0XoNH7LpzgEc781wHBbE=; b=D+Sv++ZEWurwdkU3QxWM0sgNfFme9KMTJMlpDoUxHc7Wf4kGXAgFn1ZBpCr6F3SR/u b8/bjYoKTC6jmCl0/uRV3R7M40xccJrBE7N9d+8TSAWjrPcdd5rBfp0h+9ri6qCHhX0s 2g30ctQER7FSuhFlPwvvj5R0iiVPoJ+3df/SxQfgw41XuTzjx2tk7WwX3iuDEC4v4yPP das7kcSTK/yPg304E1bYiSPnPfViWcmMIsveGs+Iy0UODFiqqvgIOEoDtAcgBT9L/7+P x7OqFewGtp758ePmovo1Ecz7yd9NyJtulOqCjIstPwkf0TsAkdCEBfMvJjJnWsA0qeaa jH1w== X-Gm-Message-State: APjAAAWyucLFsLk/kyWciTiIDz5+Rrz5075VOVo6meDcb98QiraofEqI W7yRCASlXv3hP8/dnzjLy7vapPS/0iNNqHsmbzFFFg== X-Received: by 2002:a1c:7e0b:: with SMTP id z11mr5822249wmc.88.1579282226314; Fri, 17 Jan 2020 09:30:26 -0800 (PST) MIME-Version: 1.0 References: <20200116043612.52782-1-surenb@google.com> <20200117151533.12381-1-mkoutny@suse.com> In-Reply-To: <20200117151533.12381-1-mkoutny@suse.com> From: Suren Baghdasaryan Date: Fri, 17 Jan 2020 09:30:15 -0800 Message-ID: Subject: Re: [PATCH 0/3] cgroup: Iterate tasks that did not finish do_exit() To: =?UTF-8?Q?Michal_Koutn=C3=BD?= Cc: cgroups mailinglist , Johannes Weiner , Li Zefan , Tejun Heo , alex.shi@linux.alibaba.com, Roman Gushchin , kernel-team , JeiFeng Lee , linux-arm-kernel@lists.infradead.org, LKML , linux-kselftest@vger.kernel.org, linux-mediatek@lists.infradead.org, matthias.bgg@gmail.com, shuah@kernel.org, Tom Cherry Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Michal, On Fri, Jan 17, 2020 at 7:15 AM Michal Koutn=C3=BD wrote= : > > Hi, > I was looking into the issue and came up with an alternative solution tha= t > changes task iteration to be consistent with cgroup_is_populated() check = and > moving the responsibility to check PF_EXITING on the consumers of iterato= r API. Yeah, that was my first thought which basically reverts a part of c03cd7738a83. When I first brought up this issue in the other email thread, Tejun's comment was "the right thing to do is allowing destruction of cgroups w/ only dead processes in it". I assumed, maybe incorrectly, that the desire here is not to include dying processes into cgroup.procs but to allow cgroups with dying processes to be deleted. To be clear, either way is fine with me since both ways solve the issue and this way the code is definitely simpler. I'll rerun the tests with your patches just to confirm the issue is gone. Thanks! > I haven't check your approach thoroughly, however, it appears to me it > complicates (already non-trivial) cgroup destruction path. I ran your sel= ftest > on the iterators approach and it proved working. > > > Michal Koutn=C3=BD (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 > > -- > To unsubscribe from this group and stop receiving emails from it, send an= email to kernel-team+unsubscribe@android.com. >