From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sg-1-104.ptr.blmpb.com (sg-1-104.ptr.blmpb.com [118.26.132.104]) (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 0AF263859FA for ; Mon, 2 Mar 2026 07:54:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=118.26.132.104 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772438085; cv=none; b=djpjSFc3WzNB9CyE1BIQ5dLFEyqUzxv4b9zz8EYybVAOUJiUfLHnKwxLNp6Xgv0NFKQllLhULV0qMHUjp4Gq7OmTezOvudUO3xiIt7itZi4yxVQhglJi+49F3U5/AwXfRFbjArSf4/QZMd3yPJ+NBpteGruOlArP5Xvm4QqLR6Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772438085; c=relaxed/simple; bh=Qa9IpuSjSfpTtmS0nJfwKeG6oQYGbdwsouDwUnE2vi8=; h=In-Reply-To:Content-Type:To:From:Subject:Cc:References:Date: Message-Id:Mime-Version; b=G7ou2ngB+4WsTs5DwwB643lRW7VzZdnQzXuDjQZ0V58f0cGDfPcsXNJwdZp657PIWJK8XnrB4441pahq3C6a7eEiYDHUlmZHVAUaEoGv2VCXsHWPO3l4hed05n9XacQZMBnphu69Qs15FzhoNRoqO8NNHlpPBqMwFd+Cm2lRDEU= 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=VkusLVmQ; arc=none smtp.client-ip=118.26.132.104 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="VkusLVmQ" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=2212171451; d=bytedance.com; t=1772438078; 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=VkusLVmQtVcLX5GmZDzN8vlGRGefhmL221qI5AWYYnKNnhw3Fb5oU26Qe4t4xISMWz9ihI 8ON9UpTMNw0nq62fzd9Wrn9DeZi/V2A+ov21+rA1Ck25E4t3geusbh73b1qgR1ca6eIHuH 3u35KV6uqP3SteqxTgizMnBFjENXHdsb9hcZEnf5rw+LuYlv2vwO9hKEIU+2Gmi6IJ91PU 4RLHpB0dx84J1NpOcwtAVdM5dcNlPwe4qeRpQUh/fWYvxUNQ4Le6LcNXxaVeanGcbZD4i6 U0h4wbB7ZiZUBdFkIbIOsTSS8hYJAhhaPPUDZQV8hw1g1BVb2S4wb+wBI/Qd4g== In-Reply-To: <20260302075216.2170675-1-zhouchuyi@bytedance.com> Content-Type: text/plain; charset=UTF-8 X-Lms-Return-Path: To: , , , , , , , , , , , From: "Chuyi Zhou" Subject: [PATCH v2 09/12] scftorture: Remove preempt_disable in scftorture_invoke_one Content-Transfer-Encoding: 7bit Cc: , "Chuyi Zhou" X-Original-From: Chuyi Zhou References: <20260302075216.2170675-1-zhouchuyi@bytedance.com> Date: Mon, 2 Mar 2026 15:52:13 +0800 Message-Id: <20260302075216.2170675-10-zhouchuyi@bytedance.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.20.1 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_statistics *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 complete. else if (!(torture_random(trsp) & 0xfff)) -- 2.20.1