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 C4464C05027 for ; Fri, 3 Feb 2023 15:36:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232983AbjBCPgU (ORCPT ); Fri, 3 Feb 2023 10:36:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232375AbjBCPgS (ORCPT ); Fri, 3 Feb 2023 10:36:18 -0500 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 B917F6CC87 for ; Fri, 3 Feb 2023 07:35:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1675438532; 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=uug3Jhs3c7xaX/Rx/hsjur5gbFszvyaZzpEQCntiDz4=; b=MORCjd0RRGvo7mF7VluOlp8A8iTsNtq6VfIABYMRpBCqFMgVBEFT6pxWBFxV1ZgcA3HP9c Y+p3r63BDdtBwwszcsWdXKVQfIKZiflK3OMHEH5pCeh9vcPND1zSY7IeysxbHnmeM6b8n1 cnem1cY9FH/LPKYBh4lHXLeN/V8SMYU= 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-216-IX-c6cz7MPWM2dwMahZlJg-1; Fri, 03 Feb 2023 10:35:15 -0500 X-MC-Unique: IX-c6cz7MPWM2dwMahZlJg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A4536857A93; Fri, 3 Feb 2023 15:35:14 +0000 (UTC) Received: from [10.22.18.35] (unknown [10.22.18.35]) by smtp.corp.redhat.com (Postfix) with ESMTP id EE28D40398A0; Fri, 3 Feb 2023 15:35:13 +0000 (UTC) Message-ID: <26617070-e32b-cfc2-d741-0294d5aea0c3@redhat.com> Date: Fri, 3 Feb 2023 10:35:13 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH 1/2] cpuset: Fix cpuset_cpus_allowed() to not filter offline CPUs Content-Language: en-US To: Peter Zijlstra Cc: Will Deacon , linux-kernel@vger.kernel.org, kernel-team@android.com, Zefan Li , Tejun Heo , Johannes Weiner , cgroups@vger.kernel.org References: <20230131221719.3176-1-will@kernel.org> <20230131221719.3176-2-will@kernel.org> <6b068916-5e1b-a943-1aad-554964d8b746@redhat.com> <83e53632-27ed-8dde-84f4-68c6776d6da8@redhat.com> <773e2f22-211e-163f-64bb-15ae29ad161b@redhat.com> <20230203115045.GB5927@willie-the-truck> From: Waiman Long In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/3/23 10:26, Peter Zijlstra wrote: > On Fri, Feb 03, 2023 at 10:13:10AM -0500, Waiman Long wrote: > >> I think I know where the problem is. It is due to the fact the cpuset >> hotplug code doesn't update cpumasks of the tasks in the top cpuset (root) >> at all when there is a cpu offline or online event. It is probably because >> for some of the tasks in the top cpuset, especially the percpu kthread, >> changing their cpumasks can be catastrophic. The hotplug code does update >> the cpumasks of the tasks that are not in the top cpuset. This problem is >> irrespective of whether v1 or v2 is in use. > I've been saying this exact thing for how many mails now? My bad. The fact that sched_getaffinity() masks off the offline cpus makes me thought incorrectly that tasks in the top cpuset were also updated by the hotplug code. Further testing indicates this is the case. Thanks, Longman