From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (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 4D06E3FFAA6 for ; Fri, 8 May 2026 15:03:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778252624; cv=none; b=hjU1dbEwAGxF8qNOdy9N03GNeqU3M6HW/7/Osn0yzR4/MYzpk1E/i9b7RzSQWuuUakuFb5/YlEXkIQo7FZViOfnzP/micMY4Hl1GolJvfph2zmAn21+wfoIJrF0FadFt/0BHjjXpsP3qdQyR6D+OjlRhyIlDSv36bh4x5v5+h3s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778252624; c=relaxed/simple; bh=dEFEWz3grYsJ3xFfPv2w0LqS/B3a113eXpTHuU1Bfow=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=UfrEuoZQtoeKMw0I3lYw6AoRF+WON9o+AVmOfFefkg9dL5xKDtyTwI02pcsOAkPvNQkAWmXiDgvb5L3oCTzOvRoe59vuSCZyuO4BmDDpIP32hfYllmVu48MMszl2SnKmx7/fRX5siAqMAyRAWGhgqyUr1xGhBGuPvEI+Lh6Fdto= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=NVwdU1qQ; arc=none smtp.client-ip=209.85.128.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="NVwdU1qQ" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-4891e86fabeso25331295e9.1 for ; Fri, 08 May 2026 08:03:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1778252621; x=1778857421; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=K1nwqrFtqGULq78/Os8+Xaynrz1dC0zWHqq0+EOjT34=; b=NVwdU1qQDwvhRjbVAQOxOq9NWbBJdSE6hoSKzmHC3zYc5MPloLUXZTfcSPq1YirXwh banFrouyoYJ2IJfDlJCOwkQ9tZTcFgz+hfNm3tqiuvixavb8yf+X61QxGGVn2VGSOSiQ A2UyT57iKU77l0bY+auErPxj6K4r21GJ77UMF7ORvB6SeyovoBWF7OLdHd64wzfLy3H0 hgMaPKF+GWFm98RNALbuj1IdafyHMh5DKGnLQKLvIY9QNRimxYeZf4rMiWwoZPVvml3B aHuFMkb+w0DODbjqgMeogCfwsjoEn61HKWrY5F5typWUtCUTeIS8Wp5c0gVMEcUXPuPr fCBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778252621; x=1778857421; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=K1nwqrFtqGULq78/Os8+Xaynrz1dC0zWHqq0+EOjT34=; b=QyLfe/vWkWZEO+H4eKgL0lE8m49KGutrZrQ2ltJZf2Q6MFCxBNCtx0VsBponoIrbnY SGhjC+jvw94rJxNO21dLu0f7m7T04cWAO6uG9VWF2mxODTvraFOQlPgeDOosXVATy4tV KJiu1XhZw9EZNI+ML+weIRCTwX/QbJD1dPki/FCb6KU6O9iuYldroM1CaurLbLKVW3cY VQP/99RkRj64Yvee2MdRcgUXpLGJOAtRwIcLNG7lTycZk8ERQ1VutoqTb2y0koIjJYJk 2TiV5nzcs8boQrqhDzftvY3+8/CLx/FPNDdgNehQSA+l7EHl/tCHkSLm0BkqOpzpAm6z etaw== X-Gm-Message-State: AOJu0YzdeYnmkpHr9MNcgzuG/t7vLybW9rorcsbaHuvozaE7qIa+mbV4 y3+tUX5iwa2yQXxJGvsDTpQAKUWFHwjjgKYkA1GYle+EqYctXDJUCZefFwaP1eWPo1RplZMBYNm xX1LWfoc= X-Gm-Gg: AeBDiesBnQrH+mxm+AfotaOoO6Skod8X/ZcXpRCF48Uhswtzbn2m+h0eZTZLGukVMAT RrG1MeEQJqEfQi+KK9/Yyaev2BHl5+kjJutrnam8hvZqHA6U4mDznwp8IriYJN2UKsMNj35hMIu +ASX+XJtduoOIFz9NDkov4wau/ZJTOrLD3IN40XPI5odo6RAwNyhjnQ3Ky/A8LQxsszg3yRa4Ij 2V3AfheYBHYy2Wl1RvJ53EzZDV6BNj6of8egHrLAIwRnIq89OtzW/dsvHCNI0lHfhE3rQ9TRy1P k8lfpJ5X7t3qgWbZNs2nCeH/mKIbmx5n5guSlN/8VpIcganoWKiuEhAp/0OwhC0rtd+55FWX6nK 0ATR0D7SwzXVgS5fNqZfDGvm9be9U2uqEXmtZThikQyJ/6UNWJB6Qhi6Vhl4nWtD6xGuAxYxIYZ AwMbNqIr//NZccX8lzZz4WGb71ibG1rLsWQx/BKmC7dNFm8Oo= X-Received: by 2002:a05:600c:3151:b0:48a:7605:751e with SMTP id 5b1f17b1804b1-48e51e0837amr199168805e9.4.1778252621369; Fri, 08 May 2026 08:03:41 -0700 (PDT) Received: from localhost.localdomain ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45491ca2fd6sm5262918f8f.30.2026.05.08.08.03.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2026 08:03:40 -0700 (PDT) From: Marco Crivellari To: linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org Cc: Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Marco Crivellari , Michal Hocko , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , David Rhodes , Richard Fitzgerald , patches@opensource.cirrus.com Subject: [RFC PATCH 1/2] ASoC: cs42l43: Move long delayed work on system_dfl_long_wq Date: Fri, 8 May 2026 17:03:18 +0200 Message-ID: <20260508150327.351779-2-marco.crivellari@suse.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260508150327.351779-1-marco.crivellari@suse.com> References: <20260508150327.351779-1-marco.crivellari@suse.com> 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 Content-Transfer-Encoding: 8bit Move long delayed work on system_dfl_long_wq Currently the code enqueue work items using {queue|mod}_delayed_work(), using system_long_wq. This workqueue should be used when long works are expected and it is a per-cpu workqueue. The function(s) end up calling __queue_delayed_work(), which set a global timer that could fire anywhere, enqueuing the work where the timer fired. Unbound works could benefit from scheduler task placement, to optimize performance and power consumption. Long work shouldn't stick to a single CPU. Recently, a new unbound workqueue specific for long running work has been added:     c116737e972e ("workqueue: Add system_dfl_long_wq for long unbound works") Since the workqueue work doesn't rely on per-cpu variables, there is no obvious reason that justify the use of a per-cpu workqueue. So change system_long_wq with system_dfl_long_wq so that the work may benefit from scheduler task placement. Cc: David Rhodes Cc: Richard Fitzgerald Cc: Signed-off-by: Marco Crivellari --- sound/soc/codecs/cs42l43-jack.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/cs42l43-jack.c b/sound/soc/codecs/cs42l43-jack.c index 3e04e6897b14..934666295ee3 100644 --- a/sound/soc/codecs/cs42l43-jack.c +++ b/sound/soc/codecs/cs42l43-jack.c @@ -805,7 +805,7 @@ irqreturn_t cs42l43_tip_sense(int irq, void *data) if (priv->suspend_jack_debounce) db_delay += priv->tip_fall_db_ms + priv->tip_rise_db_ms; - queue_delayed_work(system_long_wq, &priv->tip_sense_work, + queue_delayed_work(system_dfl_long_wq, &priv->tip_sense_work, msecs_to_jiffies(db_delay)); return IRQ_HANDLED; @@ -932,7 +932,8 @@ int cs42l43_jack_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *u snd_soc_jack_report(priv->jack_hp, 0, 0xFFFF); if (!override) { - queue_delayed_work(system_long_wq, &priv->tip_sense_work, 0); + queue_delayed_work(system_dfl_long_wq, &priv->tip_sense_work, + 0); } else { override--; -- 2.53.0