btrfs: remove hipri_workers workqueue
authorChristoph Hellwig <hch@lst.de>
Wed, 3 May 2023 07:06:15 +0000 (09:06 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Jun 2023 11:59:23 +0000 (13:59 +0200)
Now that btrfs_wq_submit_bio is never called for synchronous I/O,
the hipri_workers workqueue is not used anymore and can be removed.

Reviewed-by: Chris Mason <clm@fb.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/bio.c
fs/btrfs/disk-io.c
fs/btrfs/fs.h
fs/btrfs/super.c

index 990a517c069be7e82e4d888b9303c15ff2b1bee0..2e2e1abd5838266796f367eda54d4b3b269363c0 100644 (file)
@@ -615,10 +615,7 @@ static bool btrfs_wq_submit_bio(struct btrfs_bio *bbio,
 
        btrfs_init_work(&async->work, run_one_async_start, run_one_async_done,
                        run_one_async_free);
-       if (op_is_sync(bbio->bio.bi_opf))
-               btrfs_queue_work(fs_info->hipri_workers, &async->work);
-       else
-               btrfs_queue_work(fs_info->workers, &async->work);
+       btrfs_queue_work(fs_info->workers, &async->work);
        return true;
 }
 
index dabc79c1af1bda2af57fdd3b42c0260f6ccdb2b2..f4adda2b431763d1842bcf0fc6a080e2ea4fff4b 100644 (file)
@@ -1991,7 +1991,6 @@ static void btrfs_stop_all_workers(struct btrfs_fs_info *fs_info)
 {
        btrfs_destroy_workqueue(fs_info->fixup_workers);
        btrfs_destroy_workqueue(fs_info->delalloc_workers);
-       btrfs_destroy_workqueue(fs_info->hipri_workers);
        btrfs_destroy_workqueue(fs_info->workers);
        if (fs_info->endio_workers)
                destroy_workqueue(fs_info->endio_workers);
@@ -2186,9 +2185,6 @@ static int btrfs_init_workqueues(struct btrfs_fs_info *fs_info)
 
        fs_info->workers =
                btrfs_alloc_workqueue(fs_info, "worker", flags, max_active, 16);
-       fs_info->hipri_workers =
-               btrfs_alloc_workqueue(fs_info, "worker-high",
-                                     flags | WQ_HIGHPRI, max_active, 16);
 
        fs_info->delalloc_workers =
                btrfs_alloc_workqueue(fs_info, "delalloc",
@@ -2225,7 +2221,7 @@ static int btrfs_init_workqueues(struct btrfs_fs_info *fs_info)
        fs_info->discard_ctl.discard_workers =
                alloc_workqueue("btrfs_discard", WQ_UNBOUND | WQ_FREEZABLE, 1);
 
-       if (!(fs_info->workers && fs_info->hipri_workers &&
+       if (!(fs_info->workers &&
              fs_info->delalloc_workers && fs_info->flush_workers &&
              fs_info->endio_workers && fs_info->endio_meta_workers &&
              fs_info->compressed_write_workers &&
index 0d98fc5f6f44f705c2f5e8e4974332146ec3e984..840e4def18b5199be0fb9c1f41523750107df02c 100644 (file)
@@ -543,7 +543,6 @@ struct btrfs_fs_info {
         * A third pool does submit_bio to avoid deadlocking with the other two.
         */
        struct btrfs_workqueue *workers;
-       struct btrfs_workqueue *hipri_workers;
        struct btrfs_workqueue *delalloc_workers;
        struct btrfs_workqueue *flush_workers;
        struct workqueue_struct *endio_workers;
index efeb1a9d040ab7b9e75b8302ec23d4e36fe413de..8b1c1225245e4f61bc2ab92e874af8c527c2ec97 100644 (file)
@@ -1631,7 +1631,6 @@ static void btrfs_resize_thread_pool(struct btrfs_fs_info *fs_info,
               old_pool_size, new_pool_size);
 
        btrfs_workqueue_set_max(fs_info->workers, new_pool_size);
-       btrfs_workqueue_set_max(fs_info->hipri_workers, new_pool_size);
        btrfs_workqueue_set_max(fs_info->delalloc_workers, new_pool_size);
        btrfs_workqueue_set_max(fs_info->caching_workers, new_pool_size);
        workqueue_set_max_active(fs_info->endio_workers, new_pool_size);