From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 56FF81AA1DA for ; Wed, 8 Jan 2025 19:50:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736365827; cv=none; b=Zz1yIf7QGlRitJRlU/hSFNeW1TZ41kvdWHeWQgfbXnDSzsTvONd7ZUA4aaGsdvfSAFtapYYPlhcYHchWnUVeot1x9zteABQWWFdcCKGLDdAiGWzA0feE6mO6idc8zT23E57Fm8vvl13vjvfuWC0dDiSo2SNKbZza5VidCiVwQYI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736365827; c=relaxed/simple; bh=ynb8Dba1VuIVNQtCjarPDOwrVU2kRUZGRBmcUlA+eIc=; h=From:Message-ID:Date:MIME-Version:Subject:To:Cc:References: In-Reply-To:Content-Type; b=gY1o9z7msEqx+CKor8bKJTM2lZPaXwoirUU6BV7XB7+udHIsjX2nl14toRlEFTLJnSry9gC743oA2XC6CjluwgcoSfdi5TlHTLWE14dnoC+cscy/pvjyY6FH5he9lX91y2DOnW+WffJ0Y6StWilfVVZQdvSaYWzbh9yfDliGOvo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=DkjvaZPl; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="DkjvaZPl" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1736365824; 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=AVyNkvJBDY0tt3wrjEJTz3HCaKjkfL4l8QAfzujgTDc=; b=DkjvaZPlFhelz6FKT3im1RdwyXVTh211UF3q7DV8K/QXk4gRu9Y1g52PJ6ggrOkUwHWitl 6xilFnPP9te+T6LPtdImujhDOJUajphcRGp3OV3Qzp36pQULYwxjQCyjh4JgnpDEoquCA1 FQFpgBLu588FjJSZgoruVJD/ZX2Kfa0= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-81-48KEz_jtOOqj0WBfShY3Rg-1; Wed, 08 Jan 2025 14:50:23 -0500 X-MC-Unique: 48KEz_jtOOqj0WBfShY3Rg-1 X-Mimecast-MFC-AGG-ID: 48KEz_jtOOqj0WBfShY3Rg Received: by mail-qv1-f72.google.com with SMTP id 6a1803df08f44-6dadae92652so4117206d6.2 for ; Wed, 08 Jan 2025 11:50:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736365822; x=1736970622; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:user-agent:mime-version:date:message-id:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=AVyNkvJBDY0tt3wrjEJTz3HCaKjkfL4l8QAfzujgTDc=; b=wOCESnFvQJmZymxKbfYDgZQtGb7h5kkt1GqgeBGoiINKT1jVCKK4afcYadrdTMXn65 z1uA4J6+iaCqDtKFb75VgvjRMT8useScgWAATdVIFuAP2yJq0evYtArIbhWtHPWj6g55 lX1AJiLdaA8tCDGak6uKBJPYNBQ57vXa0c4zMEOg6ZYKeKzPyA4VNige1XJGZKZaMJ65 HeBstPzDF39FfLeZCrV1dXpTZIodIcoXy4asBjltcwzvCrNyCcVa8Hmw1no3jaASqXlg Jz081xoL0Ot6Pekcsaf4cWjimWl82QYNXWmhS4+rtFc30x3PfJk1VvpYQ46c2z515Dfw YKwQ== X-Forwarded-Encrypted: i=1; AJvYcCWIntuWMbRGvmxk9vjG4FwqlskeYzfxE6FCCJoN1JVSLZYjLRLeyHzlQ585ETjoBgUtDDdMACP/zSJ1e3A=@vger.kernel.org X-Gm-Message-State: AOJu0YxyF49XdCkdY2h52NFpgcKxtZVeolkOWnPKAJddK8CSMPf8JpfQ djyQRtGrrOBH5uUXSlt61tMgJ57x3YR9861PJUTRvOExsIqKe42o8uq4dm7TA6vbCvj2rAQzGml kjPlwihVksTwBik2lk9G0paBhXE7Ut5c8lN4KY+eoVIsm7G3eWai+jFDMV9Dr0g== X-Gm-Gg: ASbGncslrqwylz2Lx0BOJPGOaiPb7wK86liruDeZhsBRuPq7jppqknvzprw5UgVOTaH 9uFj9KhFlVvFIPq0ekpyD6HD0nz8oTWg1O0rLJt9UulXqOLYAVj68wTrdBl7TQCM1x/RkH1kWpP n5idR1EXhQhpIg9Z3OF5kYy1yGDYRXM4cCAonIm7h4oS539gAPgKLDiHay5Ve5f5FydJzPwm4b2 CmLu5gHJyP0CUhNmpP8WytWOcwlTwtnvEb9DpjBh7ehag54sK/gkndAjX4iCY2oTt60pqGLMn0s mKUkE12ugmQdDZ4hOTCSEmdv X-Received: by 2002:a05:6214:daf:b0:6df:9771:978e with SMTP id 6a1803df08f44-6df9b2ff13amr6376276d6.34.1736365822393; Wed, 08 Jan 2025 11:50:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IFroD2c+9NE24B9CpwxkOqr8P3LcnYS+/6xhSIcmWUvXDjUGsDUGCwc/mbKU3TFrY15bBfeDg== X-Received: by 2002:a05:6214:daf:b0:6df:9771:978e with SMTP id 6a1803df08f44-6df9b2ff13amr6375776d6.34.1736365821945; Wed, 08 Jan 2025 11:50:21 -0800 (PST) Received: from ?IPV6:2601:188:ca00:a00:f844:fad5:7984:7bd7? ([2601:188:ca00:a00:f844:fad5:7984:7bd7]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6dd180ea715sm193598676d6.11.2025.01.08.11.50.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 08 Jan 2025 11:50:21 -0800 (PST) From: Waiman Long X-Google-Original-From: Waiman Long Message-ID: <625d03cd-302f-41b1-9502-dfd25eb677e1@redhat.com> Date: Wed, 8 Jan 2025 14:50:19 -0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] cgroup/cpuset: remove kernfs active break To: Tejun Heo , Waiman Long Cc: Chen Ridong , hannes@cmpxchg.org, mkoutny@suse.com, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org References: <20250106081904.721655-1-chenridong@huaweicloud.com> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 1/8/25 2:35 PM, Tejun Heo wrote: > Hello, > > On Wed, Jan 08, 2025 at 02:27:07PM -0500, Waiman Long wrote: >> On 1/8/25 11:53 AM, Tejun Heo wrote: >> This patch looks good me. However, this does raise a question that I >> overlook when I made hotplug operation synchronous while task transfer, if >> needed, remained asynchronous. There is a very slight chance where we keep >> removing tasks added after execution capability is restored. As cgroup v1 is >> in the process of being deprecated, do you think we still need to do >> something to address this issue? > I *think* that should be fine. In cgroup1, the kernel is making irreversible > system config changes when a cgroup loses all its CPUs. I have a hard time > imagining use cases that would depend on the the exact ordering of > operations at that point. The auto transfer-out was always the last ditch > measure to not leave the system in a broken state after all. If someone's > depending on the transfer out being strictly ordered w.r.t. the cgroup > losing all CPUs and then gaining some, let's hear why the hell that ordering > matters first. Thanks for the explanation. It is not the strict ordering that I am worrying about. It is all about the possibility of hitting some race conditions. I am thinking of a scenario where a cpuset loses all its CPUs in hotunplug and then restored by adding other CPUs. There is chance that the css will be operated on concurrently by the auto-transfer task and another task moving new task to the css. I am not sure if that will be a problem or not. Anyway, it is very rare that we will be in such a situation. Thanks, Longman