Skip to content

Commit a92ce0f

Browse files
mtkaczykliu-song-6
authored andcommitted
md: drop queue limitation for RAID1 and RAID10
As suggested by Neil Brown[1], this limitation seems to be deprecated. With plugging in use, writes are processed behind the raid thread and conf->pending_count is not increased. This limitation occurs only if caller doesn't use plugs. It can be avoided and often it is (with plugging). There are no reports that queue is growing to enormous size so remove queue limitation for non-plugged IOs too. [1] https://lore.kernel.org/linux-raid/[email protected] Signed-off-by: Mariusz Tkaczyk <[email protected]> Signed-off-by: Song Liu <[email protected]>
1 parent 770b1d2 commit a92ce0f

File tree

3 files changed

+0
-20
lines changed

3 files changed

+0
-20
lines changed

drivers/md/raid1-10.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@
2222

2323
#define BIO_SPECIAL(bio) ((unsigned long)bio <= 2)
2424

25-
/* When there are this many requests queue to be written by
26-
* the raid thread, we become 'congested' to provide back-pressure
27-
* for writeback.
28-
*/
29-
static int max_queued_requests = 1024;
30-
3125
/* for managing resync I/O pages */
3226
struct resync_pages {
3327
void *raid_bio;

drivers/md/raid1.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,12 +1358,6 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
13581358
r1_bio = alloc_r1bio(mddev, bio);
13591359
r1_bio->sectors = max_write_sectors;
13601360

1361-
if (conf->pending_count >= max_queued_requests) {
1362-
md_wakeup_thread(mddev->thread);
1363-
raid1_log(mddev, "wait queued");
1364-
wait_event(conf->wait_barrier,
1365-
conf->pending_count < max_queued_requests);
1366-
}
13671361
/* first select target devices under rcu_lock and
13681362
* inc refcount on their rdev. Record them by setting
13691363
* bios[x] to bio
@@ -3410,4 +3404,3 @@ MODULE_ALIAS("md-personality-3"); /* RAID1 */
34103404
MODULE_ALIAS("md-raid1");
34113405
MODULE_ALIAS("md-level-1");
34123406

3413-
module_param(max_queued_requests, int, S_IRUGO|S_IWUSR);

drivers/md/raid10.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1387,12 +1387,6 @@ static void raid10_write_request(struct mddev *mddev, struct bio *bio,
13871387
conf->reshape_safe = mddev->reshape_position;
13881388
}
13891389

1390-
if (conf->pending_count >= max_queued_requests) {
1391-
md_wakeup_thread(mddev->thread);
1392-
raid10_log(mddev, "wait queued");
1393-
wait_event(conf->wait_barrier,
1394-
conf->pending_count < max_queued_requests);
1395-
}
13961390
/* first select target devices under rcu_lock and
13971391
* inc refcount on their rdev. Record them by setting
13981392
* bios[x] to bio
@@ -5243,4 +5237,3 @@ MODULE_ALIAS("md-personality-9"); /* RAID10 */
52435237
MODULE_ALIAS("md-raid10");
52445238
MODULE_ALIAS("md-level-10");
52455239

5246-
module_param(max_queued_requests, int, S_IRUGO|S_IWUSR);

0 commit comments

Comments
 (0)