Skip to content

Commit

Permalink
backing-dev: use synchronize_rcu_expedited instead of synchronize_rcu
Browse files Browse the repository at this point in the history
backing-dev: use synchronize_rcu_expedited instead of synchronize_rcu

synchronize_rcu sleeps several timer ticks. synchronize_rcu_expedited is
much faster.

With 100Hz timer frequency, when we remove 10000 block devices with
"dmsetup remove_all" command, it takes 27 minutes. With this patch,
removing 10000 block devices takes only 15 seconds.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
  • Loading branch information
Mikulas Patocka authored and Jens Axboe committed Jul 23, 2011
1 parent 4c64500 commit ef32308
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/backing-dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ static void bdi_remove_from_list(struct backing_dev_info *bdi)
list_del_rcu(&bdi->bdi_list);
spin_unlock_bh(&bdi_lock);

synchronize_rcu();
synchronize_rcu_expedited();
}

int bdi_register(struct backing_dev_info *bdi, struct device *parent,
Expand Down

0 comments on commit ef32308

Please sign in to comment.