Received: by 10.223.185.116 with SMTP id b49csp1005465wrg; Tue, 20 Feb 2018 11:28:28 -0800 (PST) X-Google-Smtp-Source: AH8x227486HMt8MDiC7o1nFU3HZWxdwfIkOLq8XvqSiY7qJkCsN23e0mF4uMxNDMFIIatt7vDqCF X-Received: by 10.98.95.65 with SMTP id t62mr668265pfb.11.1519154908470; Tue, 20 Feb 2018 11:28:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519154908; cv=none; d=google.com; s=arc-20160816; b=m3hl8KHSE/+AA6QDWpqw48aKG45RbjkkK7P0ZN0wD3VlX459mi1FyvXbmWcnVp2ZCc E9FX5tKIns//6jdi8T7kEbR0dUbZMwJ+7Zw9ulCuU24brOkK780sOHvtG6xffCXL9w2H TD1Bi8HSVeqjOZ+/N3IW6wQ/bzB1T21XIIRhtpS6nRZxsKPe1V2dG/tp2KyJmbOowK9L rxDYNk7fPYCHbf0YNUO4DP6exxRoeCP4VZ8aJRWvDcLYd5lVXRonRKReN92I+nySqEbH D0ZBucnBCJMeZnRzuJTz2QND92Qln3XGw9ShKC5WByyFjKaRouj38YdNboE80rD0hZ+w vIvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :reply-to:mime-version:dkim-signature:arc-authentication-results; bh=zWdyQvwF6NE/jdVD/f7PN4wZEEjvEydj4ULX2X3DUtw=; b=RdYdLMcWo6Yvt01urK+SSwi1dyHyeZLwosey24PsHaVu+xdWqIny3rWhkBG7rszY4b dX+1MDof4MWKuqBsT0HDENve71Ty5Ufz/RwXiX/ZQIBahDwI6w6D40mU+tydgWfZfGUO GpbOVkWHy3d19+2QVJ/43HDd4Nn7CGrXjjbj9fH36CsHuYcjsKfw4uHPezBYAgRydLSG 8RLx5juqKtTyEfEfVnLDHStc55aPVpys7sYXjITG4/leLB9pGJWlDUMDhRk/6hIStG0A VzVZe56CkJvtsG2rW2nStfNW3/wh74+Q8hjyMndXur6b2SEVD/fiB5P2nlu8Y6lzFCBp KQhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CCO66hVq; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r62si2408003pgr.77.2018.02.20.11.28.14; Tue, 20 Feb 2018 11:28:28 -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=@gmail.com header.s=20161025 header.b=CCO66hVq; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752392AbeBTT1W (ORCPT + 99 others); Tue, 20 Feb 2018 14:27:22 -0500 Received: from mail-wr0-f170.google.com ([209.85.128.170]:36934 "EHLO mail-wr0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751785AbeBTT1V (ORCPT ); Tue, 20 Feb 2018 14:27:21 -0500 Received: by mail-wr0-f170.google.com with SMTP id z12so11435975wrg.4; Tue, 20 Feb 2018 11:27:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:from:date:message-id:subject:to:cc; bh=zWdyQvwF6NE/jdVD/f7PN4wZEEjvEydj4ULX2X3DUtw=; b=CCO66hVqAi+6byuW7Rr3oUjASoFDlQqjmAiKpV6CTPVHRxEqtGkIXfFw771E7usppq 8MIuyWkCnAh5LlrpDxdQMgTN0qsCRPZtV73fHLZq8OKmPgN4bnfyxyKn8TSx5tIHBSOX CABfYVaakfAwFoLmm/g3srKXAEAi+uCuBIqZb1sk6Xc1Q/FKF0Re24Zo/9LVY+MhK7A4 ZW14gUpe5j/h4j/LGg5wwLphw3LZPM7t17u7trs+oQNR53q1mm+hSExVUxHtAAtHvmlM 4w/aYAG52kwJR3+1nwav0R2Yk4KnM7fdw9MNRu4Pxm7uTrl3PvWVlV0DrxLbOJSUvu60 rtRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:from:date:message-id :subject:to:cc; bh=zWdyQvwF6NE/jdVD/f7PN4wZEEjvEydj4ULX2X3DUtw=; b=CWYUutxGHvUTPRcCTWkrmet+tuzk8HsHNTRPaTxsjZ/IGakx1CHHE3SeQoKBQc6H4o xT6/C6E6chE9eSs8v0Vzq0eSItvb/tt4V/uFWIpiWxCsR3IK0oJj1AT18aK1HPpwd9tQ RLeDGu8j6oqVivUTc7Q8M+ny3E6DZNATYgftVOgx1BNSta6qhmjautSH5A640YUlGeg5 MVh32vyzZSGZfga70ElmFZc7WXOlakSf/ll82L3+SZ35+XxzUzp0BvsIgPjfVGx7otj3 rl3XY854FvriKiyarNoJ/H1nwvxZkll8HoA2B5sDjwe0AKoSW5y7ui+tYPJIPg/JOzle 6tJQ== X-Gm-Message-State: APf1xPASdukYBG3indeMeZUEy+4WJ08RpxOB6whr2rcNN5IwRvP4PVn2 6sC5eH1fWPVaLIOFiu9ibzlSeDMUI3CL/O0U/eM= X-Received: by 10.80.149.236 with SMTP id x41mr1627704eda.64.1519154840206; Tue, 20 Feb 2018 11:27:20 -0800 (PST) MIME-Version: 1.0 Received: by 10.80.153.194 with HTTP; Tue, 20 Feb 2018 11:26:59 -0800 (PST) Reply-To: mtk.manpages@gmail.com From: "Michael Kerrisk (man-pages)" Date: Tue, 20 Feb 2018 20:26:59 +0100 Message-ID: Subject: A "domain invalid" cgroup *can* sometimes have member tasks To: Tejun Heo Cc: "Serge E. Hallyn" , lkml , "open list:CONTROL GROUP (CGROUP)" , Michael Kerrisk Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Thanks, Michael -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/