]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
workqueue: bound maximum queue depth
authorDave Chinner <dchinner@redhat.com>
Thu, 15 Apr 2021 19:44:49 +0000 (15:44 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Thu, 15 Apr 2021 19:44:49 +0000 (15:44 -0400)
commitb6af4fa8a45c2993653238d071b5b692f07b1662
treeb106c19c4393772ff31b37a960a6baec877fdb83
parentbc8ff33541c2afb4663c83b9aa825a6e41e5d6bc
workqueue: bound maximum queue depth

Existing users of workqueues have bound maximum queue depths in
their external algorithms (e.g. prefetch counts). For parallelising
work that doesn't have an external bound, allow workqueues to
throttle incoming requests at a maximum bound. Bounded workqueues
also need to distribute work over all worker threads themselves as
there is no external bounding or worker function throttling
provided.

Existing callers are not throttled and retain direct control of
worker threads, only users of the new create interface will be
throttled and concurrency managed.

Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libfrog/workqueue.c
libfrog/workqueue.h