From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7F0FBC4320E for ; Wed, 11 Aug 2021 18:46:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 606476101D for ; Wed, 11 Aug 2021 18:46:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230496AbhHKSqx (ORCPT ); Wed, 11 Aug 2021 14:46:53 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:60997 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229947AbhHKSqw (ORCPT ); Wed, 11 Aug 2021 14:46:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628707588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BOILZBJ0R4YxSBlomh5xiyJL3tlxmw5VR/2YYVBHfVY=; b=EwW1Lt7iXin0ZAb0YDhwtWWbqICvcow1T6t8TIqgeW3Ycfjhdzi922VTdJiwbiHaW0D6lo KiPxSoeE3+2kQIULIqK1c0ZlGxHafOYUwdeTAlxaUWRfdYSfAH699RDYx822sQBQX+OBvH pPP5DqI00Tuhdr0k0VS6u5M5lpUaEw0= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-251-0k77OzVwM_iT_Gqqr1aDXg-1; Wed, 11 Aug 2021 14:46:27 -0400 X-MC-Unique: 0k77OzVwM_iT_Gqqr1aDXg-1 Received: by mail-qt1-f197.google.com with SMTP id g17-20020ac870d10000b02902928f62e229so1792374qtp.18 for ; Wed, 11 Aug 2021 11:46:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=BOILZBJ0R4YxSBlomh5xiyJL3tlxmw5VR/2YYVBHfVY=; b=uI0YWUYlQVwjRL66vZZVByosrgipRUYzrGZ4056tlMovNHB5ZqdGmW9FJePgZ5X1D6 ySQ0oBNxneyhZxxDkluRUAkDhZfwXWMo6+6a4diR2UO9N+Q247i+77vACyRKwAq6XF/d yGqeM7Ha++kCTCYFZfY5BH/FQap/XViGLww2tA3sWs1T6IG/IjWW6hI8P36bID8x7nkP lWYcahzgqurJnkggPtZzcec4oENkABw++UsoXKDSg+SNp2gAPapgTD8heDSzzwVAlHSA /3Z2veXznrAHacqaAjs/jdJoW4WyFzYAkUtVy6xHAMXIA7v/2QgP3biaOEhy6QAlSylZ mMQQ== X-Gm-Message-State: AOAM533mLnqYlIBkaS5uZYfReAOQXvQqtIM06DhwtTz2mQypFJe1Pfph 8yc+gm2xdAVzrGdsr96JloPKbBlAWsQrnOmII0nMmoDKLTl07IZZy/VqbfOw4PtJU17o2YPGPB5 ii0ggQnkime50R+ZErfgRgy0e X-Received: by 2002:ac8:47d9:: with SMTP id d25mr123617qtr.247.1628707586780; Wed, 11 Aug 2021 11:46:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwc+HweGCSjMpjaJcpagiM7+c0ZCQmmIkZOMJU7you99awb+4aUS28VxuYA6K2SQkpFfVwoCg== X-Received: by 2002:ac8:47d9:: with SMTP id d25mr123604qtr.247.1628707586605; Wed, 11 Aug 2021 11:46:26 -0700 (PDT) Received: from llong.remote.csb ([2601:191:8500:76c0::cdbc]) by smtp.gmail.com with ESMTPSA id s69sm12744271qka.102.2021.08.11.11.46.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 11 Aug 2021 11:46:25 -0700 (PDT) From: Waiman Long X-Google-Original-From: Waiman Long Subject: Re: [PATCH v4 4/6] cgroup/cpuset: Allow non-top parent partition root to distribute out all CPUs To: Tejun Heo , Waiman Long Cc: Zefan Li , Johannes Weiner , Jonathan Corbet , Shuah Khan , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, Andrew Morton , Roman Gushchin , Phil Auld , Peter Zijlstra , Juri Lelli , Frederic Weisbecker , Marcelo Tosatti , =?UTF-8?Q?Michal_Koutn=c3=bd?= References: <20210811030607.13824-1-longman@redhat.com> <20210811030607.13824-5-longman@redhat.com> Message-ID: Date: Wed, 11 Aug 2021 14:46:24 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/11/21 2:21 PM, Tejun Heo wrote: > On Wed, Aug 11, 2021 at 02:18:17PM -0400, Waiman Long wrote: >> I don't think that is true. A task can reside anywhere in the cgroup >> hierarchy. I have encountered no problem moving tasks around. > Oh, that shouldn't be happening with controllers enabled. Can you please > share a repro? I have done further testing. Enabling controllers won't prohibit moving a task into a parent cgroup as long as the child cgroups have no tasks. Once the child cgroup has task, moving another task to the parent is not allowed (-EBUSY). Similarly if a parent cgroup has tasks, you can't put new tasks into the child cgroup. I don't realize that we have such constraints as I usually do my testing with a cgroup hierarchy with no tasks initially. Anyway, a new lesson learned. I will try to see how to address that in the patch, but the additional check added is still valid in some special case. Cheers, Longman From mboxrd@z Thu Jan 1 00:00:00 1970 From: Waiman Long Subject: Re: [PATCH v4 4/6] cgroup/cpuset: Allow non-top parent partition root to distribute out all CPUs Date: Wed, 11 Aug 2021 14:46:24 -0400 Message-ID: References: <20210811030607.13824-1-longman@redhat.com> <20210811030607.13824-5-longman@redhat.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628707588; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BOILZBJ0R4YxSBlomh5xiyJL3tlxmw5VR/2YYVBHfVY=; b=EwW1Lt7iXin0ZAb0YDhwtWWbqICvcow1T6t8TIqgeW3Ycfjhdzi922VTdJiwbiHaW0D6lo KiPxSoeE3+2kQIULIqK1c0ZlGxHafOYUwdeTAlxaUWRfdYSfAH699RDYx822sQBQX+OBvH pPP5DqI00Tuhdr0k0VS6u5M5lpUaEw0= In-Reply-To: Content-Language: en-US List-ID: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: Tejun Heo , Waiman Long Cc: Zefan Li , Johannes Weiner , Jonathan Corbet , Shuah Khan , cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kselftest-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Andrew Morton , Roman Gushchin , Phil Auld , Peter Zijlstra , Juri Lelli , Frederic Weisbecker , Marcelo Tosatti , =?UTF-8?Q?Michal_Koutn=c3=bd?= On 8/11/21 2:21 PM, Tejun Heo wrote: > On Wed, Aug 11, 2021 at 02:18:17PM -0400, Waiman Long wrote: >> I don't think that is true. A task can reside anywhere in the cgroup >> hierarchy. I have encountered no problem moving tasks around. > Oh, that shouldn't be happening with controllers enabled. Can you please > share a repro? I have done further testing. Enabling controllers won't prohibit moving a task into a parent cgroup as long as the child cgroups have no tasks. Once the child cgroup has task, moving another task to the parent is not allowed (-EBUSY). Similarly if a parent cgroup has tasks, you can't put new tasks into the child cgroup. I don't realize that we have such constraints as I usually do my testing with a cgroup hierarchy with no tasks initially. Anyway, a new lesson learned. I will try to see how to address that in the patch, but the additional check added is still valid in some special case. Cheers, Longman