From nobody Wed Apr 1 11:21:45 2026 Received: from va-1-115.ptr.blmpb.com (va-1-115.ptr.blmpb.com [209.127.230.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 368183DC4C4 for ; Tue, 31 Mar 2026 11:33:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.127.230.115 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774956813; cv=none; b=WHnv3MbuOTYS4cIImfDz0jlyqPVF/Hc0693GZEVEfbRfX9Zo0Y+B4XnMzmiSUXiymkcZl2NG29yiVOkIO/fCyseRnzToNozgDD0dbxImQJP6he8facla0oF0vtABzCzG0fdHdJ89BG1l2ChXKeFOBwalQUnOcNa30R5CcRuhdCo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774956813; c=relaxed/simple; bh=Qa9IpuSjSfpTtmS0nJfwKeG6oQYGbdwsouDwUnE2vi8=; h=From:Message-Id:Content-Type:Cc:Subject:Date:To:In-Reply-To: References:Mime-Version; b=hDfM9WdjMRFiT17FkH4yhxTSCZfxhWiUW+R9l2Kvkr+oV0VdIINU4i9Z4S4WTzZCeBagUBGedw9vJj+ctfxc7O7iP/AL4T4SVUDxKpdZAfSFeeUgDc/W+A4f0vbjP7WVpGATTNrcYbsHbkRLE8HeUI15aU4TzHY0pJi4LkIIsLg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com; spf=pass smtp.mailfrom=bytedance.com; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b=I15t4j8a; arc=none smtp.client-ip=209.127.230.115 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=bytedance.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bytedance.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bytedance.com header.i=@bytedance.com header.b="I15t4j8a" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=2212171451; d=bytedance.com; t=1774956807; h=from:subject: mime-version:from:date:message-id:subject:to:cc:reply-to:content-type: mime-version:in-reply-to:message-id; bh=0usi0H2e8tYtT63WQwB8R/fMy+WKcYDOp5mE7Fo7UFU=; b=I15t4j8aNagbcVS7iY9/upwhEa7ghk66vSxrNVy5ECGHqGVnB7PT7rKvS1gi2EwPac2Efx A2e+azkmQHA+b5+gOEIs8L81qggby6J6QJo6Fteho4BtNapcU04ZbtdkwnsRLdtcfGlC2T +aqydjftxW8OXSD75D0wVIX5pY4cNo6l+U/BTxKn6BYYgJvDCV5NjCiUhejoXjcTy2pzSX rMBA6u3mlHFPgo6VOZ5NEGM0ppuik4ykRTQSUo0MGLOFS+V7HcRyXlhcPKvBKonlZjQSD3 IVUx+tJNGZF6fVqqKQm3qcaw/DKxnnXvWQX3dqmwVo7Wg5m224PK9BF+l0zAmw== From: "Chuyi Zhou" Message-Id: <20260331113103.2197007-10-zhouchuyi@bytedance.com> X-Mailer: git-send-email 2.20.1 Cc: , "Chuyi Zhou" Subject: [PATCH v4 09/12] scftorture: Remove preempt_disable in scftorture_invoke_one Date: Tue, 31 Mar 2026 19:31:00 +0800 X-Original-From: Chuyi Zhou X-Lms-Return-Path: To: , , , , , , , , , , , , In-Reply-To: <20260331113103.2197007-1-zhouchuyi@bytedance.com> References: <20260331113103.2197007-1-zhouchuyi@bytedance.com> Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Previous patches make smp_call*() handle preemption logic internally. Now the preempt_disable() by most callers becomes unnecessary and can therefore be removed. Remove preempt_{enable, disable} in scftorture_invoke_one(). Signed-off-by: Chuyi Zhou --- kernel/scftorture.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/kernel/scftorture.c b/kernel/scftorture.c index 327c315f411c..b87215e40be5 100644 --- a/kernel/scftorture.c +++ b/kernel/scftorture.c @@ -364,8 +364,6 @@ static void scftorture_invoke_one(struct scf_statistics= *scfp, struct torture_ra } if (use_cpus_read_lock) cpus_read_lock(); - else - preempt_disable(); switch (scfsp->scfs_prim) { case SCF_PRIM_RESCHED: if (IS_BUILTIN(CONFIG_SCF_TORTURE_TEST)) { @@ -411,13 +409,10 @@ static void scftorture_invoke_one(struct scf_statisti= cs *scfp, struct torture_ra if (!ret) { if (use_cpus_read_lock) cpus_read_unlock(); - else - preempt_enable(); + wait_for_completion(&scfcp->scfc_completion); if (use_cpus_read_lock) cpus_read_lock(); - else - preempt_disable(); } else { scfp->n_single_rpc_ofl++; scf_add_to_free_list(scfcp); @@ -463,8 +458,6 @@ static void scftorture_invoke_one(struct scf_statistics= *scfp, struct torture_ra } if (use_cpus_read_lock) cpus_read_unlock(); - else - preempt_enable(); if (allocfail) schedule_timeout_idle((1 + longwait) * HZ); // Let no-wait handlers com= plete. else if (!(torture_random(trsp) & 0xfff)) --=20 2.20.1