Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E1BAC05027 for ; Tue, 14 Mar 2023 18:21:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229974AbjCNSVv (ORCPT ); Tue, 14 Mar 2023 14:21:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjCNSVt (ORCPT ); Tue, 14 Mar 2023 14:21:49 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76F0E12874 for ; Tue, 14 Mar 2023 11:21:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678818062; 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=mZu0RzwIJilde3oJZLOmJNiQa9ScwZN4JDJCiFaDOu0=; b=fzjg0E2UfHFJbVqEnPqoPSzynwKZdmbEbuEz1e9/2QKr0AiA3zPKMpQ0uMUiaxuc997aoy EgV5koipdUBTSYJ2Fd6LnCI6Cp9p7WByUAl6eIEuEJfD50pW1QkrrWdXf3V8LjUGbFeNKs mV9eDzi/hFWj368GliV1UHBr+CBiYEQ= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-380-fXFSDEw8M8STJQQyKTOawQ-1; Tue, 14 Mar 2023 14:20:57 -0400 X-MC-Unique: fXFSDEw8M8STJQQyKTOawQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 84036100F90B; Tue, 14 Mar 2023 18:20:54 +0000 (UTC) Received: from [10.22.18.199] (unknown [10.22.18.199]) by smtp.corp.redhat.com (Postfix) with ESMTP id C84FB4042AC0; Tue, 14 Mar 2023 18:20:53 +0000 (UTC) Message-ID: <176a4cfd-2902-16a2-b9e7-cb66e1c5b49c@redhat.com> Date: Tue, 14 Mar 2023 14:20:53 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH 1/5] cgroup/cpuset: Skip task update if hotplug doesn't affect current cpuset Content-Language: en-US To: =?UTF-8?Q?Michal_Koutn=c3=bd?= Cc: Tejun Heo , Zefan Li , Johannes Weiner , Shuah Khan , cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Will Deacon , Peter Zijlstra References: <20230306200849.376804-1-longman@redhat.com> <20230306200849.376804-2-longman@redhat.com> <20230314165030.beu2ywtvqa3p45ta@blackpad> From: Waiman Long In-Reply-To: <20230314165030.beu2ywtvqa3p45ta@blackpad> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/14/23 12:50, Michal Koutný wrote: > On Mon, Mar 06, 2023 at 03:08:45PM -0500, Waiman Long wrote: >> If a hotplug event doesn't affect the current cpuset, there is no point >> to call hotplug_update_tasks() or hotplug_update_tasks_legacy(). So >> just skip it. > This skips "insane" modification of cs->cpus_allowed in > hotplug_update_tasks_legacy() but assuming cs->cpus_allowed is kept in > sync with cs->effective_cpus on v1, it is OK to skip the update based > only on effective_cpus check. Yes, effective_cpus is equivalent to cpus_allowed in v1 unless you mount the cpuset with the cpuset_v2_mode flag which will behave more like v2 where effective_cpus is still the key. Cheers, Longman