From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (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 304FF3E63A7 for ; Fri, 8 May 2026 13:45:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778247958; cv=none; b=g5bjDZnRCcUG2wN/PaEa8pY85Vk6OKuBLO2XA5Apgd+T8QqdaFho3IH11mkYWULu5BwS/N6EbT3CmMuh+dfP35T5yMYEB4Z2Anx95RABe4VRie5bgc9HEv4RD1bDi4kE5OdSVOpb8oEmp4uVJp5FE93Dv7s/D48aFPEVgZ7GYF4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778247958; c=relaxed/simple; bh=x5R+hraEhRXnrYzPR+VvU6e3VuR7TF5w7ce72ny6MsY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=JmSAdA8yUxOOIftbbR10yjlqJlNJb4M+VobCJBunUZZM4X8yrstE3RcrU9McffSbL0IU9mp5Do7yaYMmqDqDLj+S42vT6/itRz7XlQczzjIrhfqkOrCASo9wzlT2CApV7a4zOaodeYhdbQmHzyQ5EtpWwuwL7/1ZnKWDtYGEdDg= 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=aaaNlj8r; arc=none smtp.client-ip=209.85.128.53 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="aaaNlj8r" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-488e1a8ac40so19804095e9.2 for ; Fri, 08 May 2026 06:45:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1778247953; x=1778852753; 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=sUC6icIU8/by706DNfsxKmniCKIFMGJQAqyCvmSbiBc=; b=aaaNlj8r6XfEwTaezEXA9ugx6kgHLjHca1Mzm5sU7bND6YAFnxOOPtLAU3gO5YLhT/ epEsiH6kFAm39IYTS3D7478DOomEZeaB48/X0C0+9kHek5MGK2k/Y2s8nqFcqDM/tGpe 9ye05cGMNVKeV/j7TLaKGu3um3zzx06IyRXviQE/yhk2PQb8qBCy/DJa1qZo/nk9/1Vz pPVQKdrfge9x8olaypnkqaezIx3t/4uE6/hLP2wjG6Pi4Qrk01b06TIQxlBa+hQ5QCUI nfXrZ0iXvVyOYjT4bhZBW5I/vwcCLsjYAdADGtwvbDgZ6dlLW1jW2R90n6Ilwc21tGlv /Kzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778247953; x=1778852753; 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=sUC6icIU8/by706DNfsxKmniCKIFMGJQAqyCvmSbiBc=; b=drH0ef6Xtqp3fp2DHsu4cCk6SMGHl4fpywfetGZASrqObjr49DBt1qyjct4A01YH4u eQobt2hbweOyRmiQPUPuYHJ+EgDrB47Zuce18FHiwS+pmEc4eLbUoB3PiUeAejR8TxC/ eL+tAt6ZD8iCuh5JQnkYqM/5Yz7OiCI9yKr4EiljMlcsYI+b+FcD4vla6w1xQuFFRFQO 3SgTyqYEc5VnP5VdjferyXQcW2lCg0AjOvUJAetGLsZxHHkq7kM4kccPO2xdLk7V8k7F nDd3tY6il86JGSx5dFfMqvCzgMdal33gvmpTjfIkuEy8qTfw23IzSwLVeDDItRcVjyA5 cxBw== X-Gm-Message-State: AOJu0Yw9CmebOw5hf8huv8kBoAtFMzNMuVTXXNkJjt53ZxC9ZDr3IDq8 STbhopPF2BHdrWHhz8qvJMLEH7QH+GP5l3AZIO4yvbkWUDL6re9sAf4jG80rxiFr7X16rSWgKuX uX8AeBSc= X-Gm-Gg: AeBDieskVQ2OfCdc0o6uxbNMcP7uXQ78LW9Ya9sXeNWIv8f9YZNgoXRklmYCNFnsb0y cjSkwYLWEpD77By8yd7oQ111fLGsXzoM3Lalg8MTUviqB7rEteIrl0sNXADQN37wOLUT2dwCVjE qSG6LYVuVrizIrlQZ8/mRtllIUpuKovbQ4kTWPlm8chWdMOzDRwwvfrIMfXvBPE7t0KuX1tWsoT QI6/f1A1lcsKXdxXbeKE2yGXbfe7ktlJFgVKhsmNV+e2TFi+ONbe3t4nOrf4SChU0609CPm/FYy q3IsXmd/pe7BN7n9Qi6z2YP8nkIh8or2yIp9zdCtQNeCAczktKKVJq2uIfzYeB5HlmTTJcl1CtH /6qfGsMJNDxOSiaEepy9Cgmxw7XUU1E6ofNT6Eps9QnDoSR5bPwmW4QGf6Uxr5l7GJEvcevQf/h p5ezwXpF5AIGTlA+45T+BhPsxBsgKVKVV7ABiB8EF0Fuc9gdI= X-Received: by 2002:a05:600c:871b:b0:48a:592c:e655 with SMTP id 5b1f17b1804b1-48e51f45eddmr195991075e9.17.1778247953241; Fri, 08 May 2026 06:45:53 -0700 (PDT) Received: from localhost.localdomain ([2a00:6d43:105:c401:e307:1a37:2e76:ce91]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48e6db1413csm178475e9.29.2026.05.08.06.45.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2026 06:45:52 -0700 (PDT) From: Marco Crivellari To: linux-kernel@vger.kernel.org Cc: Tejun Heo , Lai Jiangshan , Frederic Weisbecker , Sebastian Andrzej Siewior , Marco Crivellari , Michal Hocko , David Woodhouse , Richard Weinberger , linux-mtd@lists.infradead.org Subject: [RFC PATCH 2/6] fs/jffs2: Move long delayed work on system_dfl_long_wq Date: Fri, 8 May 2026 15:45:30 +0200 Message-ID: <20260508134541.282073-3-marco.crivellari@suse.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260508134541.282073-1-marco.crivellari@suse.com> References: <20260508134541.282073-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 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 Woodhouse Cc: Richard Weinberger Cc: linux-mtd@lists.infradead.org Signed-off-by: Marco Crivellari --- fs/jffs2/wbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c index 8ff7a0b6add2..3b7803c75d58 100644 --- a/fs/jffs2/wbuf.c +++ b/fs/jffs2/wbuf.c @@ -1177,7 +1177,7 @@ void jffs2_dirty_trigger(struct jffs2_sb_info *c) return; delay = msecs_to_jiffies(dirty_writeback_interval * 10); - if (queue_delayed_work(system_long_wq, &c->wbuf_dwork, delay)) + if (queue_delayed_work(system_dfl_long_wq, &c->wbuf_dwork, delay)) jffs2_dbg(1, "%s()\n", __func__); } -- 2.53.0