From nobody Tue Jun 16 17:20:55 2026 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 1AECB36827E for ; Thu, 30 Apr 2026 09:15:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777540545; cv=none; b=JinN+tBng76FG57zCA9exd7HIjK3ENuT1kkKlHrwfghsQ6oBq3hs76EXiRc0Fmdbgsug01YaGfokxI8T8dU971c9zM5/3NnCTrFfNUSPJj8GbQAUzSGKKT94AhT0HVzoXCWu4NWQLgG0O6ctEBSkclNgNs0Dy9cukvhO8uKjvtM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777540545; c=relaxed/simple; bh=CbmM+6MIxtUhsXWOpY58t5jaN2YONCzmXTvqR2VpCLE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=LEcmepriZJ4oXqd4CwoMoWiRgX/T2vPDjKUTxwiuieT1F2Y7wRS7vWpZxjxH46pGIr/Pm2ewUPFBp8mUphCjgb0vAba2s9mP7kjMNPLr9hrr+L70M9DuFTMllsKbjyAcN/ZLTy9NOdxmbyU+kIgfDfSbYrvniYodYkh6Ftn0XhU= 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=Xo2txbFe; arc=none smtp.client-ip=209.85.128.46 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="Xo2txbFe" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-488e1a8ac40so6549485e9.2 for ; Thu, 30 Apr 2026 02:15:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1777540542; x=1778145342; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=e5t1FiQPj6AzB52JircQaBZx/EXB4p7emQ+fZCfnRP8=; b=Xo2txbFe1XN6YAw1AAIpZzFbaCJH8yKJeBvykxsHnxCJQlXczl3Xqv6McR2/W8oOD4 dHtyY2p0OhGxgEIirYtVLKm0XL0ndfUTAprFlYR2PwnKW5wB9MyUJU1NAl+Ur5n/jBhN l+ZJ6DvXK3L4Vlf4sG46rh68sDfa6KnCYfw+cf7FE5MJyRIS0LCspzJBy0MTPQKm8LPD yFxyu0kk+yVjojdqavguSPNIst0BDb+NMOJmZW+t2hNQC+dbGq9y+EzvUqtnYQuCsjal XxZFh1UEWm/G99dkHWIgtCWrcyMIn1U40yZiYDm0B+Co8jjA0xnRq41DA8izM0OluTKE 67/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777540542; x=1778145342; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=e5t1FiQPj6AzB52JircQaBZx/EXB4p7emQ+fZCfnRP8=; b=bMppG7k4VDJw7kFWPyQ80shCntyJfCZiJqOeGTCoNx9xWKAUsvnd2vs2XE1H3sGdkC mCalWoIbh9qrEgfMiMxfhW3GCZlelkb1YyAZAn5oXJSYziMkA5tb3WBMeoQ5bDlBDRR4 vvxn/VPClJ0fMNrp247WEXH22Tq2TLPkmyKzWF4P2FhGjv15NFQKIxtGwVzmEWPpih2w mrO8uEk8fIe/7OJuf4SmGZnSGWYHkFSjd08LJT5Xwo5tLYv2jSCAF+DpxTgksKI5SfGe yyBgq0ABLYKloCgyegOwgfjYWaetJjAWpFOJY5Guq2jqh6kVRCtw2w+kEqNb40+2ESQE x5vg== X-Gm-Message-State: AOJu0YzQ+uwBtd5JB2ysUICP5vXbIdFzZ+t2X3c4LCKMRTrvBlwpJk4F tG5/lt91Wo4Iy1k/gI5wX81kImEDdlRsMGFsF7Vlq478U33+QyJbBv8nPEgT9bb+0BoESRuk/fY qvJUm0NE= X-Gm-Gg: AeBDieszeGo/uJdK/jkyAgs8iZSayEKTil538GggunvR8AxkU/bzDeYCyeSMiJx4vct Xc7qnEFjsdBRojydE1EG3bkaYrW81IUiNbcmpFOvszs0xJbTdGBto8yZbRiLbJQJa1SFqQEieFY 1aRVcJ0e0hBPEnMRCaAqXo4BVQAkd9MQpkv+TjEcDOQ2zdIbbLdKeboHrv01Q6XMyGE1heSaJNV SzOqFJA0T8ivPUZ12gC7BcR8lOylm2J4KOmOFU/y2PN12YHSx0T/Zcjx8ikv/+HcTvZ+x+VCXoQ iwt/mQyVHotlJzbbYhSTe3WK2pdUKGDqdbh5ydNExegUqpzBRsbwyEC9cKwDHhAN18HRwd1Hi6q N2wOzVlhOsIL0yihasAIgAK+74idX/wuphp2LjBj5FngGNnPtNGPfXpZSwIODI7bDtbbiDLsGxy JXeXoinyzotzplwx9jKE5z1VMxP2Mwk8d7JWUaDV5JO3ivJkU3Dhrn+jbK3w== X-Received: by 2002:a05:600c:8289:b0:48a:592c:e632 with SMTP id 5b1f17b1804b1-48a8444495cmr36955705e9.16.1777540542080; Thu, 30 Apr 2026 02:15:42 -0700 (PDT) Received: from localhost.localdomain ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-447b4216ecasm12023358f8f.14.2026.04.30.02.15.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Apr 2026 02:15:41 -0700 (PDT) From: Marco Crivellari To: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Marco Crivellari , Michal Hocko , Hans de Goede , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter Subject: [RFC PATCH] drm/gm12u320: Replace system_long_wq with system_dfl_long_wq Date: Thu, 30 Apr 2026 11:15:32 +0200 Message-ID: <20260430091532.115846-1-marco.crivellari@suse.com> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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, but it is a per-cpu workqueue. This is important because queue_delayed_work() queue the work using: queue_delayed_work_on(WORK_CPU_UNBOUND, ...); Note that WORK_CPU_UNBOUND =3D NR_CPUS. This would end up calling __queue_delayed_work() that does: if (housekeeping_enabled(HK_TYPE_TIMER)) { // [....] } else { if (likely(cpu =3D=3D WORK_CPU_UNBOUND)) add_timer_global(timer); else add_timer_on(timer, cpu); } So when cpu =3D=3D WORK_CPU_UNBOUND the timer is global and is not using a specific CPU. Later, when __queue_work() is called: if (req_cpu =3D=3D WORK_CPU_UNBOUND) { if (wq->flags & WQ_UNBOUND) cpu =3D wq_select_unbound_cpu(raw_smp_processor_id()); else cpu =3D raw_smp_processor_id(); } Because the wq is not unbound, it takes the CPU where the timer fired and enqueue the work on that CPU. The consequence of all of this is that the work can run anywhere, depending on where the timer fired. Recently, a new unbound workqueue specific for long running work has been added: c116737e972e ("workqueue: Add system_dfl_long_wq for long unbound works= ") So change system_long_wq with system_dfl_long_wq so that the work may benefit from scheduler task placement. Signed-off-by: Marco Crivellari Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/tiny/gm12u320.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tiny/gm12u320.c b/drivers/gpu/drm/tiny/gm12u32= 0.c index d73dfebb4353..4ad074337af0 100644 --- a/drivers/gpu/drm/tiny/gm12u320.c +++ b/drivers/gpu/drm/tiny/gm12u320.c @@ -388,7 +388,7 @@ static void gm12u320_fb_update_work(struct work_struct = *work) * We must draw a frame every 2s otherwise the projector * switches back to showing its logo. */ - queue_delayed_work(system_long_wq, &gm12u320->fb_update.work, + queue_delayed_work(system_dfl_long_wq, &gm12u320->fb_update.work, msecs_to_jiffies(IDLE_TIMEOUT)); =20 return; @@ -427,7 +427,8 @@ static void gm12u320_fb_mark_dirty(struct drm_framebuff= er *fb, mutex_unlock(&gm12u320->fb_update.lock); =20 if (wakeup) - mod_delayed_work(system_long_wq, &gm12u320->fb_update.work, 0); + mod_delayed_work(system_dfl_long_wq, + &gm12u320->fb_update.work, 0); =20 if (old_fb) drm_framebuffer_put(old_fb); --=20 2.53.0