From nobody Thu Dec 25 06:44:28 2025 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 F31E35479F for ; Fri, 19 Jan 2024 15:55:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705679756; cv=none; b=uDQqcFX12sowfoETnfEHwR36adL+wEHxCrBs4ADqVK0CLeD96Z+cWFN8QDLNKoT80f7AZz2tL1j07zVnaFk3P0VANsSGqKfBmflvJutSHXYtcktguncBoylFx/G5GJQcd6auRfmRB0kcx3cKavzgfFXjEbX7TsUu2e6I6QxtlVk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705679756; c=relaxed/simple; bh=TTwLpk+9WyqbjEGOZGuIU8l92E+nf3CARA/Oc1cdr5c=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=Q26qn6tYNQflL8q+s6SVOP1YJL66CIZxTAFC77SIMaR7xbyVr6xtR1N92AXsrIQ70ZyWGq0nxFVbw//VeQ9TjfpnYKKT6q2JVlAKKyjBJkrzNmZ1w+REqvVUGrYyerPaDHFbhQGwmPqAWLOCV/gIALL59XStvVQKs1OmEt2oUQk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=SMqSVSvq; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="SMqSVSvq" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1705679754; 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; bh=tnzMEK1Gp8cYV4BR16ID72YGGPaqlCx174qqJsFmo8k=; b=SMqSVSvqTPYCoNPEya2yamhwJQYjGIB87uSEUJKieLgl+nCaTe1m06z3EQ1Tz4ga7xJ6Tc +0JW9nlvdB57XnG4a8HFcwFPQFMKxms6g/bML0Z3ZhZSbYQpOqNQde0ZhGlcnchTxDQ1/5 n89L7dMiR8lk9VCbEwPLCp4OFD6xqO4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-99-W3JnvKtKPrecbLyAftJkZw-1; Fri, 19 Jan 2024 10:55:49 -0500 X-MC-Unique: W3JnvKtKPrecbLyAftJkZw-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6EB29867945; Fri, 19 Jan 2024 15:55:49 +0000 (UTC) Received: from tpad.localdomain (unknown [10.96.133.4]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 383B3492BE2; Fri, 19 Jan 2024 15:55:49 +0000 (UTC) Received: by tpad.localdomain (Postfix, from userid 1000) id B7CB3401A1D88; Fri, 19 Jan 2024 12:54:39 -0300 (-03) Date: Fri, 19 Jan 2024 12:54:39 -0300 From: Marcelo Tosatti To: Tejun Heo Cc: Frederic Weisbecker , Joe Mario , Juri Lelli , linux-kernel@vger.kernel.org Subject: [PATCH] mark power efficient workqueue as unbounded if nohz_full enabled Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" A customer using nohz_full has experienced the following interruption: oslat-1004510 [018] timer_cancel: timer=3D0xffff90a7ca663cf8 oslat-1004510 [018] timer_expire_entry: timer=3D0xffff90a7ca663cf8 functi= on=3Ddelayed_work_timer_fn now=3D4709188240 baseclk=3D4709188240 oslat-1004510 [018] workqueue_queue_work: work struct=3D0xffff90a7ca663cd8 = function=3Dfb_flashcursor workqueue=3Devents_power_efficient req_cpu=3D8192= cpu=3D18 oslat-1004510 [018] workqueue_activate_work: work struct 0xffff90a7ca663cd8 oslat-1004510 [018] sched_wakeup: kworker/18:1:326 [120] CPU:018 oslat-1004510 [018] timer_expire_exit: timer=3D0xffff90a7ca663cf8 oslat-1004510 [018] irq_work_entry: vector=3D246 oslat-1004510 [018] irq_work_exit: vector=3D246 oslat-1004510 [018] tick_stop: success=3D0 dependency=3DSCHED oslat-1004510 [018] hrtimer_start: hrtimer=3D0xffff90a70009cb00 func= tion=3Dtick_sched_timer/0x0 ... oslat-1004510 [018] softirq_exit: vec=3D1 [action=3DTIMER] oslat-1004510 [018] softirq_entry: vec=3D7 [action=3DSCHED] oslat-1004510 [018] softirq_exit: vec=3D7 [action=3DSCHED] oslat-1004510 [018] tick_stop: success=3D0 dependency=3DSCHED oslat-1004510 [018] sched_switch: oslat:1004510 [120] R =3D=3D> kwo= rker/18:1:326 [120] kworker/18:1-326 [018] workqueue_execute_start: work struct 0xffff90a7ca663= cd8: function fb_flashcursor kworker/18:1-326 [018] workqueue_queue_work: work struct=3D0xffff9078f119ee= d0 function=3Ddrm_fb_helper_damage_work workqueue=3Devents req_cpu=3D8192 c= pu=3D18 kworker/18:1-326 [018] workqueue_activate_work: work struct 0xffff9078f119e= ed0 kworker/18:1-326 [018] timer_start: timer=3D0xffff90a7ca663cf8 fun= ction=3Ddelayed_work_timer_fn ... Set wq_power_efficient to true, in case nohz_full is enabled.=20 This makes the power efficient workqueue be unbounded, which allows workqueue items there to be moved to HK CPUs. Signed-off-by: Marcelo Tosatti diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 76e60faed892..45b3a63954a9 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -6630,6 +6630,13 @@ void __init workqueue_init_early(void) wq_update_pod_attrs_buf =3D alloc_workqueue_attrs(); BUG_ON(!wq_update_pod_attrs_buf); =20 + /* + * If nohz_full is enabled, set power efficient workqueue as unbound. + * This allows workqueue items to be moved to HK CPUs. + */ + if (housekeeping_enabled(HK_TYPE_TICK)) + wq_power_efficient =3D true; + /* initialize WQ_AFFN_SYSTEM pods */ pt->pod_cpus =3D kcalloc(1, sizeof(pt->pod_cpus[0]), GFP_KERNEL); pt->pod_node =3D kcalloc(1, sizeof(pt->pod_node[0]), GFP_KERNEL);