From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-177.mta1.migadu.com (out-177.mta1.migadu.com [95.215.58.177]) (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 63A2227144B for ; Fri, 30 Jan 2026 00:20:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769732441; cv=none; b=PKQ0EnypKiioqU6zu2JdglmqyDPFxC8pZ/WTaX27dfW7KNXs+FnFzJb9vS/iEiq5gpzki4X2ZtV6aRJrZggjU8yhv2DfJ3Zq1IZr5OInhRDdyj27GEgNbyopuBy8luQdBr16K1FMtAYuWNrHM428gHZbwVdTJY7rt38Ni58qAT4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769732441; c=relaxed/simple; bh=d3pN3ZqURn7m9Kll7g9wucXUukIajYqJ65oOxIxUBI4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=VW8NhPyYA8fUjhhXZ9L4RwcRxuRhUbVoVofeZ1rTi66dify8yiyNeeMSc2c01asl43bwAoZi2pYLlKFcQ4g7aN2e8EukNuqWaowJOBjI02BiyZf7Nyp0uLKIWuim48n87muQ9oR5qrfDyRbD+f0TUYG+dR814kbpcNWqPAMmebc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=eKQAG9xM; arc=none smtp.client-ip=95.215.58.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="eKQAG9xM" Message-ID: <969dda1a-1126-4313-80dc-b2df8e5435e1@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1769732427; 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=TAAk0lB9kOwahuMysui5IUk6b/Kc/Wb9vWPicJvP6jE=; b=eKQAG9xMX6PshhZsAVZTqj69zG1lomtweQqeTkkresApMhHpkRp47oYQ2pBaYmnEW2cz0z yEsVs1UI9WpSxjQBvUFxboTkQVWf5KF0CPtC3t00oojKjTrCBmHkXk1fxpvRIm+9rshVc8 ajU72XOauGBmo+RONJ06eFBvPTIDvF4= Date: Thu, 29 Jan 2026 16:20:04 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [patch 0/4] sched/mmcid: Cure mode transition woes To: Thomas Gleixner , LKML Cc: Shrikanth Hegde , Peter Zijlstra , Mathieu Desnoyers , Michael Jeanson , bpf References: <20260129210219.452851594@kernel.org> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Ihor Solodrai In-Reply-To: <20260129210219.452851594@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 1/29/26 1:20 PM, Thomas Gleixner wrote: > Ihor and Shrikanth reported hard lockups which can be tracked back to the recent > rewrite of the MM_CID management code. > > 1) The from task to CPU ownership transition lacks the intermediate > transition mode, which can lead to CID pool exhaustion and a > subsequent live lock. That intermediate mode was implemented for the > reverse operation already but omitted for this transition as the > original analysis missed a few possible scheduling scenarios. > > 2) Weakly ordered architectures can observe inconsistent state which > causes them to make the wrong decision. That leads to the same problem > as with #1. > > The following series addresses these issue and fixes another albeit harmless > inconsistent state hickup which was found when analysing the above issues. Thomas, thank you for addressing this so quickly. I applied the series as temporary BPF CI specific patches. I'll report if I notice any relevant issues. > > With these issues addressed the last change optimizes the bitmap > utilization in the transition modes. > > The series applies on Linus tree and passes the selftests and a thread pool > emulator which stress tests the ownership transitions. > > Thanks, > > tglx > --- > include/linux/rseq_types.h | 7 - > kernel/sched/core.c | 170 +++++++++++++++++++++++++++++---------------- > kernel/sched/sched.h | 45 +++++++++-- > 3 files changed, 151 insertions(+), 71 deletions(-)