Skip to content

Commit

Permalink
dm kcopyd: avoid pointless job splitting
Browse files Browse the repository at this point in the history
Don't split SUB_JOB_SIZE jobs

If the job size equals SUB_JOB_SIZE, there is no point in splitting it.
Splitting it just unnecessarily wastes time, because the split job size
is SUB_JOB_SIZE too.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
  • Loading branch information
Mikulas Patocka authored and Alasdair G Kergon committed May 29, 2011
1 parent 6f13f6f commit a705a34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/md/dm-kcopyd.c
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ int dm_kcopyd_copy(struct dm_kcopyd_client *kc, struct dm_io_region *from,
job->fn = fn;
job->context = context;

if (job->source.count < SUB_JOB_SIZE)
if (job->source.count <= SUB_JOB_SIZE)
dispatch_job(job);

else {
Expand Down

0 comments on commit a705a34

Please sign in to comment.