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 29FF53D3D02 for ; Wed, 4 Mar 2026 18:11:42 +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=1772647905; cv=none; b=OrdAT3F6HuIJodPp9ENvfn3KNJZUx0LF4WArum70bihIx54ETXk4O/ticu0D/A4IG0qPms7cQQhTtjE371gENYFHI5+tIeesUAfzjbOTikPB1VdtJV8jQPR8Z1CcsGlCFRzMHwcNDgiRIdnaABj8fhJwNzrh0j/Ri2AR9a+dN2E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772647905; c=relaxed/simple; bh=cb4y2nZytFUTBjTWPqQJWtOD68YUktKfQo9N/u0reMY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=SYNkIGeZNjfGv536vuBE3WffX7u6GXtH57uMTE56sdjFonFZoVulkTajpsbqzRe9wSu1p2Hclvp82NEoHdnBOkiSBC3YpygDILvtUoAB6xIy1ZLriBjhP7o2zbC9L5sQggc+Wxt8cr57a2wpklfyPKo3jRWdbcZ9uEljfC+TS/c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine 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=bJBlPgky; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine 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="bJBlPgky" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1772647902; 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=r75+9K5ySWolahPAJ2e0ED/yndC4WL32Fqg5S686FY8=; b=bJBlPgkypVqKsAMAc+xCZSuklipcRmi14gkVvNkKfg0lFDwUqKlJic5VBJQ0nR3AYM6Ww+ 3Ytf5HTyDfH2Eae5HvHI/+5VY3OahXT8wv6E8ib+ACCP7JVhfJknxb/FMCQg3PNUg4e/6J Ek14QNEUClYmbuPe8SObdPgiUVx8ut8= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-13-b_lShdBIOHOfL7-cqWjQdg-1; Wed, 04 Mar 2026 13:11:38 -0500 X-MC-Unique: b_lShdBIOHOfL7-cqWjQdg-1 X-Mimecast-MFC-AGG-ID: b_lShdBIOHOfL7-cqWjQdg_1772647895 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8842919560B7; Wed, 4 Mar 2026 18:11:34 +0000 (UTC) Received: from [10.22.89.197] (unknown [10.22.89.197]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3182818002A6; Wed, 4 Mar 2026 18:11:30 +0000 (UTC) Message-ID: Date: Wed, 4 Mar 2026 13:11:29 -0500 Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 7/8] cgroup/cpuset: Defer housekeeping_update() calls from CPU hotplug to workqueue To: Jon Hunter , Chen Ridong , Tejun Heo , Johannes Weiner , =?UTF-8?Q?Michal_Koutn=C3=BD?= , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , Frederic Weisbecker , Thomas Gleixner , Shuah Khan Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, "linux-tegra@vger.kernel.org" References: <20260221185418.29319-1-longman@redhat.com> <20260221185418.29319-8-longman@redhat.com> <1a89aceb-48db-4edd-a730-b445e41221fe@nvidia.com> <8ad885a8-be65-4d1b-b8c4-dabe50fe3788@redhat.com> Content-Language: en-US From: Waiman Long In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 On 3/4/26 6:07 AM, Jon Hunter wrote: > > On 04/03/2026 03:58, Waiman Long wrote: > > ... > >> It looks that -EBUSY was returned when the script tries to online/ >> offline a CPU. I ran a simple script to repetitively doing offline/ >> online operation and couldn't reproduce the problem. I don't have >> access to the tegra board that you use for testing. Would you mind >> trying out the following patch to see if it can get rid of the problem. >> >> Thanks, >> Longman >> >> diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c >> index e200de7c60b6..5a5953fb391c 100644 >> --- a/kernel/cgroup/cpuset.c >> +++ b/kernel/cgroup/cpuset.c >> @@ -3936,8 +3936,10 @@ static void cpuset_handle_hotplug(void) >>           * previously queued work. Since hk_sd_workfn() doesn't use >> the work >>           * item at all, this is not a problem. >>           */ >> -       if (update_housekeeping || force_sd_rebuild) >> -               queue_work(system_unbound_wq, &hk_sd_work); >> +       if (force_sd_rebuild) >> +               rebuild_sched_domains_cpuslocked(); >> +       if (update_housekeeping) >> +               queue_work(system_dfl_wq, &hk_sd_work); >> >>          free_tmpmasks(ptmp); >>   } >> >> > > Yes that did the trick. Works for me. Feel free to add my ... > > Tested-by: Jon Hunter Thanks for the confirmation. Cheers, Longman