lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1576595472-27341-1-git-send-email-qiwuchen55@gmail.com>
Date:   Tue, 17 Dec 2019 23:11:12 +0800
From:   qiwuchen55@...il.com
To:     viro@...iv.linux.org.uk
Cc:     linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        chenqiwu <chenqiwu@...omi.com>
Subject: [RESEND PATCH] fput: Use unbound workqueue for scheduling delayed fput works

From: chenqiwu <chenqiwu@...omi.com>

There is a potential starvation that the number of delayed fput works
increase rapidly if task exit storm or fs unmount issue happens.

Since the delayed fput works are expected to be executed as soon as
possible. The commonly accepted wisdom that the measurements of scheduling
works via the unbound workqueue show lowered worst-case latency responses
of up to 5x over bound workqueue.

Work items queued to an unbound wq are not bound to any specific CPU, not
concurrency managed. All queued works are executed immediately as long as
max_active limit is not reached and resources are available.

Signed-off-by: chenqiwu <chenqiwu@...omi.com>
---
 fs/file_table.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/file_table.c b/fs/file_table.c
index 30d55c9..472ad92 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -348,7 +348,8 @@ void fput_many(struct file *file, unsigned int refs)
 		}
 
 		if (llist_add(&file->f_u.fu_llist, &delayed_fput_list))
-			schedule_delayed_work(&delayed_fput_work, 1);
+			queue_delayed_work(system_unbound_wq,
+					&delayed_fput_work, 1);
 	}
 }
 
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ