Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp9365816ybl; Fri, 17 Jan 2020 10:42:49 -0800 (PST) X-Google-Smtp-Source: APXvYqyB5J5oVv26iGZTemMSBAW3z1NhGAEw8lVLb1J40t5oJfYqoWEaaBEVweyVtjPRy5APyt6N X-Received: by 2002:a05:6830:1e8a:: with SMTP id n10mr7034457otr.303.1579286569094; Fri, 17 Jan 2020 10:42:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579286569; cv=none; d=google.com; s=arc-20160816; b=jHwjPsN584pmyttrQOUG1gl4BUix/Ln7ugBU8NeHzw6QdkNtE0FcqcrSy8NJ/iuh8P uBGdeJy79FSm7z3iiMEXsGwI8kY6QRi644nR/xzoA/YOiMeG1fgtUNo7Y+pCjy2ZW1Gi /JRg+4KWiz1yI6g1KFHYAsXZKYxxCKE9dXjrGgOIrRDKtvGU800uRSWp/QU7OaVpaV4T /zGGnrsJ+4bRycp+A9wlcLtSLVFsfH86OB/oCrK7/6oeRXbe4TbSIPWrKnGxWFCVy/mN xOXo7MVz2FmuQUM2m9iIMvTGyAByt9sKn01WGK3e2wbU4IpeOaT0nGZVEj45NlmPlnkC Yngg== 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=Hl2KZMvca+Q8kuDbq/WhLs/Rb2uaYU/dE+p/JdLh8Ok=; b=otWeT6ET5VCTW577QNfEzJLCaqi5m8aT4QQsZ91E3AlOF8JF6uY/wcq8TKOanaeCQT evlrNqIGZkrF8nLwmsYdM6uL57VM2e/ifJpJhedCz8gswFaeCc2vCvPVjBRnNso+Ekrr WJFDoVc+SkgH0YtYQUYWJSJH2QHuiQvZyeNvDC8FNGnCifytQfpD6MhVstQfx6OVTWLi eIgjFsTRnSzmuT516o+XKLFiFJm1kRsA/0ZiWRBOea2NSuMk3WOxuHOjL9TWt1+4uUqD nEi7XCWN65iHDH4PZQnzs3dlOkrriuICp7aj0DFp7TfZ13r0XBfFi/RaB89Y4qcaInK0 /dlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=pya+t3lj; 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 l20si15398275otd.292.2020.01.17.10.42.36; Fri, 17 Jan 2020 10:42:49 -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=pya+t3lj; 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 S1729174AbgAQSln (ORCPT + 99 others); Fri, 17 Jan 2020 13:41:43 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:34843 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726935AbgAQSln (ORCPT ); Fri, 17 Jan 2020 13:41:43 -0500 Received: by mail-wr1-f67.google.com with SMTP id g17so23675513wro.2 for ; Fri, 17 Jan 2020 10:41:41 -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=Hl2KZMvca+Q8kuDbq/WhLs/Rb2uaYU/dE+p/JdLh8Ok=; b=pya+t3ljvih0NEjKSrRArdnH313MxZONXt8kTq2RCSmOCsZP7KR3baPZAFPehTPQxx VuKQfkLNIc4O7hDdNydFUo+Rit+LleyvNPqIqy5948KMTJxnyj2MVgDSFofqnZqQS5Nx Or3Zo594/EnJk39EWoCRDMjG4V8NF2BmHRXws3l/1nFpofa/+Bvxs6YNhCcdsqG7x3wk vR24AbaUtYr8X6KA5iQGuwz6Z7LgbIrcG2vC/4HLMaSGjk6nSLQU3vF89b7ikkhwAMpc A800IqSQpGRJuHLz6yxrYHsfaVbVemOGjrYeY0sTZTYGZtjBtpiMZzaKyNvlSn/ysOZH U/KQ== 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=Hl2KZMvca+Q8kuDbq/WhLs/Rb2uaYU/dE+p/JdLh8Ok=; b=DirBzovWKh2e70l9Xk5PcR0tcyy2IFUsGTAEfy4pBgfPmaQfCtaQs5Zs9WW1UM+MV+ S29XcnYfRx5nOsLLytaP9DdH64rn79avx2p41j9SaT4oCP6aGaslAdJr96nO29F92XSx GqOTXb07dpRGID3F4XsDiQT6SmvjL5d+VoBMLP1nE5zUUqBb3ihct6xFn755XhVV1rOJ 8rN8T/BWPfILvZAwQ/aBIHkdjN85oAYW7DIkxod0n91ggZ8jdphdKGma0aGZJicu+LSo yow0DquxHLTJWQcirr1SIcUkZDnfnBH01gAsN6xyXXxMSa/+8eGxTO5mNDg0axJb0GKw E/hw== X-Gm-Message-State: APjAAAWeSNDMl99g9BJ/Jb8jI7OvvoPSTIgUH4/kPlczORM8N2oLzPsA VvTXY88zHiPXQ17Ht5dW9hmNLone4i15sH0cp08M8Q== X-Received: by 2002:adf:e887:: with SMTP id d7mr4490076wrm.162.1579286500370; Fri, 17 Jan 2020 10:41:40 -0800 (PST) MIME-Version: 1.0 References: <20200116043612.52782-1-surenb@google.com> <20200117151533.12381-1-mkoutny@suse.com> <20200117151533.12381-3-mkoutny@suse.com> <20200117172806.GK2677547@devbig004.ftw2.facebook.com> In-Reply-To: <20200117172806.GK2677547@devbig004.ftw2.facebook.com> From: Suren Baghdasaryan Date: Fri, 17 Jan 2020 10:41:29 -0800 Message-ID: Subject: Re: [PATCH 2/3] cgroup: Iterate tasks that did not finish do_exit() To: Tejun Heo Cc: =?UTF-8?Q?Michal_Koutn=C3=BD?= , cgroups mailinglist , Johannes Weiner , Li Zefan , 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 On Fri, Jan 17, 2020 at 9:28 AM Tejun Heo wrote: > > On Fri, Jan 17, 2020 at 04:15:32PM +0100, Michal Koutn=C3=BD wrote: > > PF_EXITING is set earlier than actual removal from css_set when a task > > is exitting. This can confuse cgroup.procs readers who see no PF_EXITIN= G > > tasks, however, rmdir is checking against css_set membership so it can > > transitionally fail with EBUSY. > > > > Fix this by listing tasks that weren't unlinked from css_set active > > lists. > > It may happen that other users of the task iterator (without > > CSS_TASK_ITER_PROCS) spot a PF_EXITING task before cgroup_exit(). This > > is equal to the state before commit c03cd7738a83 ("cgroup: Include dyin= g > > leaders with live threads in PROCS iterations") but it may be reviewed > > later. Tested-by: Suren Baghdasaryan > > Yeah, this looks fine to me. Any chance you can order this before the > clean up so that we can mark it for -stable. > +1 for reordering. Makes it easier to backport. Thanks, Suren. > Thanks. > > -- > tejun > > -- > To unsubscribe from this group and stop receiving emails from it, send an= email to kernel-team+unsubscribe@android.com. >