Received: by 10.223.185.116 with SMTP id b49csp1013628wrg; Tue, 20 Feb 2018 11:38:13 -0800 (PST) X-Google-Smtp-Source: AH8x224R67sXS6lL3P7VOWyCj8aI3tSaq8Ok7ijoFBBXvtIKW6DsbDKLl/Fzi7xHOUzSZ8SKuFLN X-Received: by 10.98.200.80 with SMTP id z77mr673946pff.85.1519155493302; Tue, 20 Feb 2018 11:38:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519155493; cv=none; d=google.com; s=arc-20160816; b=BUJC2C/FQ3rIGAW5Iov4Ik0oPQ5ur6reN9chUmMhCVw1uQzsJMpkg8RzgptkMy+56l 2MwAPaMZvYLg9rDqTeeZYwZxUPPP41o2yCV71zTOjGhfEuubgsPcYClsiFn3F/jPO6ej UaFDYrdr0Ddc9/RSA9xNYxPVNfwyTDieZ146y9UFlf2BUeTaEkeTBjle72xp/Xc5rxq3 eW7YogDNqZbAKMWH1pDL+8pGHxlPzIB/kSIld8kE95JSZhBzAv2YqvrIWiV7RLYXufub QmS9zigJT8zegxqAwLeTjAX+/uJPqd+F5v8k+C2V3Jg05LIP3JRtL1wd3h35skrsPVqP ytdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=0EbqUImbVkhORc0/olQyNFVfQ7izMr7k6Xz+cnJbBok=; b=CGNq/VkDB3LLOAmCytRR9x2I5lbMYwWsOIYQrUluxro7DHE+GOCv5uI4/vbUURJX67 dSIxWdRbG5MbqHN1pzKFT2A6il8HiR7pPzQ1LdiT0tr2o3rjvoh8puOQngH3Mhlgl+pM TyXpIllAaNtc3CJ5tUUjRIWUGyNLbB7O4zPq/YFj9HtEhrjAg4RvUcr//jEi7cRJQRhN kRI712goaYDOjKdd7LshtTqgWhrGQnEWAFDoLJnyk9A9Mkq/ds2nXj21KAqp0CSTvpTX QVczwHEYryqipUcfwF9BI9UhUfymi5jtzcMVPJG2VgIcTwYQQqZyivsCqb6MVOssbUXh PE+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Jd7Ll2+u; 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 n5si1632923pfi.199.2018.02.20.11.37.58; Tue, 20 Feb 2018 11:38:13 -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=fail header.i=@gmail.com header.s=20161025 header.b=Jd7Ll2+u; 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 S1752930AbeBTTf5 (ORCPT + 99 others); Tue, 20 Feb 2018 14:35:57 -0500 Received: from mail-qt0-f181.google.com ([209.85.216.181]:39833 "EHLO mail-qt0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752130AbeBTTf4 (ORCPT ); Tue, 20 Feb 2018 14:35:56 -0500 Received: by mail-qt0-f181.google.com with SMTP id f4so17867948qtj.6; Tue, 20 Feb 2018 11:35:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=0EbqUImbVkhORc0/olQyNFVfQ7izMr7k6Xz+cnJbBok=; b=Jd7Ll2+uiMzbCYnioC0dZgA3R5rWfZSN7XpH1AVER7jHCZiL+YrwAe9JFJ/YeJ1xA8 Bs0YVfFCoPXA/yte6HxAQMSNffESd5RdpOWfO3rsCYbytj29OEZeOZsaL3b9qUChYYbT umvKAySo6RXVxBCIz8V2+wxpNGoqjC0qQ4rCJAHLp5cykYJFAKQqSmaU7WT0SzXg2Ava BK1iTfwLkiGQvjefWkuXTdQ0PA/iH/gT9uS4AbsvW7rftt+fCD4qdvFStcQzj4RCwalJ QKU9A6hxBHiLIFyqs1Li4dvYCuzh6fiTB2E1Q3ceNq0lTvBzgI35z6JKvxv1HH0OOCfK IdJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=0EbqUImbVkhORc0/olQyNFVfQ7izMr7k6Xz+cnJbBok=; b=ExZXGldcuNgGOGDZk4+5iY7hLvSq8eiZbPEASuWBKfA82KGXxf0+FY0/wFIEcY4dKt 1nTC4GDY+3HPjb3zIabbCJNGqcQbYyTH/j5zCLcT2WUtNBZcvPBuqAtuXKlgvUztqByX JDsp3pV/CRJlB6WAUr/tqJM4K5q7x7zqYCDKaBcBa/hMViMiwLZLMVnZnXflpuXyjNQI 5Gh2x4yQ6YIjS98mFlgHBOP2XzB5t9qIo+TBhCXsGrO9U6FXAclRLkBKpfXs5MmONJLR 5dn72Cb3jC9XYjsPDBvPZseOYrfoXw9Cb2ceNQPlN1lmbAYyl9mblMRNEe1OenicYOxq 8f/A== X-Gm-Message-State: APf1xPB80tuIax1AVGvic0eOw4w0708jo0KCrfw88t61z7M4M0W0n6EJ 9FRIwcRG/7OdydCtB+s9snI= X-Received: by 10.200.38.61 with SMTP id u58mr1195471qtu.269.1519155355255; Tue, 20 Feb 2018 11:35:55 -0800 (PST) Received: from localhost (dhcp-ec-8-6b-ed-7a-cf.cpe.echoes.net. [72.28.5.223]) by smtp.gmail.com with ESMTPSA id m64sm792681qkf.48.2018.02.20.11.35.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Feb 2018 11:35:54 -0800 (PST) Date: Tue, 20 Feb 2018 11:35:47 -0800 From: Tejun Heo To: "Michael Kerrisk (man-pages)" Cc: "Serge E. Hallyn" , lkml , "open list:CONTROL GROUP (CGROUP)" Subject: Re: A "domain invalid" cgroup *can* sometimes have member tasks Message-ID: <20180220193547.GB170644@devbig577.frc2.facebook.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 20, 2018 at 08:26:59PM +0100, Michael Kerrisk (man-pages) wrote: > Hello Tejun > > According to Documentation/cgroup-v2.txt, a "domain invalid" cgroup > can't have member tasks. And indeed this is generally not permitted. > > However, someone recently showed me a scenario where a "domain > invalid" cgroup can have member processes. See the following example: > > # mkdir -p /sys/fs/cgroup/unified/grp0/grp1 > # sleep 1000 & > [1] 10549 > # echo 10549 > /sys/fs/cgroup/unified/grp0/grp1/cgroup.procs > # echo threaded > /sys/fs/cgroup/unified/grp0/cgroup.type > # cat /sys/fs/cgroup/unified/grp0/cgroup.type > threaded > # cat /sys/fs/cgroup/unified/grp0/grp1/cgroup.type > domain invalid > # cat /sys/fs/cgroup/unified/grp0/grp1/cgroup.threads > 10549 > > From the above, we see that the cgroup grp0/grp1 is of type "domain > invalid" and has a member thread. This seems to be a violation of the > documented rules, and is I assume a bug, since in the above scenario, > we are denied from adding further tasks to the grp0/grp1 cgroup: > > # sleep 2000 & > [2] 10553 > # echo 10553 > /sys/fs/cgroup/unified/grp0/grp1/cgroup.procs > sh: echo: write error: Operation not supported > > Could you comment please? Hmm... nr_populated_domain_children check should have caught that condition and rejected it. Will look into what's going on. Thanks. -- tejun