Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp992354imu; Tue, 20 Nov 2018 09:55:11 -0800 (PST) X-Google-Smtp-Source: AFSGD/VnihISuuWaEZv7BXQbX1F7J8btSoplFfGYoon500ipqjTOky2XYiCQ9oJO/1kUL005AGj1 X-Received: by 2002:a63:4b60:: with SMTP id k32mr2779862pgl.186.1542736511535; Tue, 20 Nov 2018 09:55:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542736511; cv=none; d=google.com; s=arc-20160816; b=yQui5Yr2oc9Zq8w6wXsupsyeGYkvzyJzVEebPc0If2jCq1GyEHMV9ooZ+2cW04Wpu9 97y3Eba08AOncu24YwHxVj58xwOLvr1mN3uD9POSM4WfU7xO9UJPOZlOqGIwObs/8gny qK9IHkF40oWmkkvxWMySC9CbiY3ckzHiIW8f0jITp9LRYHIUOQRi0qXUSEsVUBN8uXgy 7Bo6gg9JEjr93tWU9aUM3W6FRhcY+ZyBAVO/edt66j/ligujcbWUTQP8pZA/158A3zQP 8wDSeVIjTAYjRWkiAyl7IYSwro67WJV6m8RRcmHdbyyZd0shN6kfUsouABqYMvaD6Kd8 bvmw== 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; bh=bgwKqPKTuNIZc8ZNsu7oVmFBZQ8IygAJo53SBFGFiIQ=; b=sVcnHeWLHHcRth7zTNyT/fc1q58swAaAdd3VDhBWsZLIVHRlWescMSk45ESCTEtdBO jqrWINFvnFCRnYgxHIkptoqcgzXg8hW0RE5ncJwkkwkIXkm7yMoxf2+OytjZDVwdHXoA z9zWKj1WV2F2qp4SDXbNeU70xCrPoHq6cI/ljmP4za9cgZiDve89BOPGGj4GteGjCl2Q SS+tdQSEX4ECLUOPTVNQ83eqDASE/cRiS1ecId+a90jCdSeevMj+JIQ5Z1bZs+d/g3mZ pX4BGkCdG+9tPbHeyFB1YGrTeggztotSUIGxm8zlvEFPl7Bmgmnd4pkejgy/cHDPu4eU rzcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=V1bA6YEe; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p1-v6si38212801plb.290.2018.11.20.09.54.56; Tue, 20 Nov 2018 09:55:11 -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=V1bA6YEe; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727683AbeKUCnQ (ORCPT + 99 others); Tue, 20 Nov 2018 21:43:16 -0500 Received: from mail-qt1-f193.google.com ([209.85.160.193]:42059 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725887AbeKUCnQ (ORCPT ); Tue, 20 Nov 2018 21:43:16 -0500 Received: by mail-qt1-f193.google.com with SMTP id d19so569519qtq.9; Tue, 20 Nov 2018 08:13:23 -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=bgwKqPKTuNIZc8ZNsu7oVmFBZQ8IygAJo53SBFGFiIQ=; b=V1bA6YEeXrAtNVoYUUFf0jskgCq4F6fh+L1tUr4yzb8+4XauJAgjqEJT4vZI8S7ryQ g7yt1a3lwu4fXWSLPSLAO7F/D9UgZkLc9uVpsqIi+bszk5j0RQlf4j4oTC874itO9Lvc 4fxRpShIc5ARo8KqCeVpAQY5Cx/MKFkuAeEXM3hGPRGI+pa1kZ0adZq+4RLqhKTU9SAO JkjtMmTV1v5movdnpcR7sg4IYmloHCavOT/Hmit++RUJfNucmgbnbNyEF4R5tpe4sKQ+ ufzT0OaMpBZumOBDp6Q52NQ2isscfdZb0uhux60HLPaVJkUlAVyfyBx8Ty1te+A094jm 0TCQ== 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=bgwKqPKTuNIZc8ZNsu7oVmFBZQ8IygAJo53SBFGFiIQ=; b=XVr9UaN+1wzA72mms+ZA9HYsUg3NmBLAIF0EJP8yq1UfOcOqkbzVu+6D+4ayxHi4mc av08EZQ51mNATsPdGH1qa7cEVu5zwh3QpxZweBqbYWE5Hsk/tqXYJyqPUTPoFOjyVJSJ U185hQbra3y//6vMjaSo/R21n0oJK4hLc5Xh19z0CHXIZYzio3iIlIlKwCJgP/nuIGqC iKosL5nUT6UYRsKdhwfXulZ19A9at3EtLOysO/6WZ/R1vX9iACPT2GuTo6SKHKLaIP+w vFLBBLJheKtDwyYIh7b/dUoZ10k0yxocrvCXchVh4JyH2fXJXC+ICoXNUF/0KaDJrPBH k+gQ== X-Gm-Message-State: AGRZ1gKXBdevhM5J4yglMUamFY2StGB+jp2HuWdq845xWW0NvuuY2IB6 Lh2TB5WDkOk40PNOsiVfICY= X-Received: by 2002:aed:2c87:: with SMTP id g7mr2422356qtd.52.1542730402507; Tue, 20 Nov 2018 08:13:22 -0800 (PST) Received: from localhost ([2620:10d:c091:200::7:4b6a]) by smtp.gmail.com with ESMTPSA id r47sm28373586qtc.77.2018.11.20.08.13.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Nov 2018 08:13:21 -0800 (PST) Date: Tue, 20 Nov 2018 08:13:19 -0800 From: Tejun Heo To: "Michael Kerrisk (man-pages)" Cc: "open list:CONTROL GROUP (CGROUP)" , lkml , kernel-team@fb.com Subject: Re: [PATCH for-4.20-fixes] cgroup: fix CSS_TASK_ITER_PROCS Message-ID: <20181120161319.GR2509588@devbig004.ftw2.facebook.com> References: <20181108201515.GC2509588@devbig004.ftw2.facebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181108201515.GC2509588@devbig004.ftw2.facebook.com> 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 Thu, Nov 08, 2018 at 12:15:15PM -0800, Tejun Heo wrote: > CSS_TASK_ITER_PROCS implements process-only iteration by making > css_task_iter_advance() skip tasks which aren't threadgroup leaders; > however, when an iteration is started css_task_iter_start() calls the > inner helper function css_task_iter_advance_css_set() instead of > css_task_iter_advance(). As the helper doesn't have the skip logic, > when the first task to visit is a non-leader thread, it doesn't get > skipped correctly as shown in the following example. Applied to cgroup/for-4.20-fixes. Thanks. -- tejun