Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 314576 Details for
Bug 438153
Poor LVM mirroring performance
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
second patch
linux-2.6.18-dm-unplug-queues-in-threads.patch (text/plain), 4.11 KB, created by
Mikuláš Patočka
on 2008-08-19 21:10:17 UTC
(
hide
)
Description:
second patch
Filename:
MIME Type:
Creator:
Mikuláš Patočka
Created:
2008-08-19 21:10:17 UTC
Size:
4.11 KB
patch
obsolete
>Upstream commit: 7ff14a36159d947872870e7a3e9dcaebc46b23eb (2.6.26-rc1) > >Avoid 3ms delay in dm-raid and kcopyd. > >It is specified that any submitted bio without BIO_RW_SYNC flag may plug the >queue (i.e. block the requests from being dispatched to the physical device). > >The queue is unplugged when the caller calls blk_unplug() function. Usually, thesequence is that someone calls submit_bh to submit IO on a buffer. The IO plugs the queue and waits (to be possibly joined with other adjacent bios). Then, whenthe caller calls wait_on_buffer(), it unplugs the queue and submits the IOs to >the disk. > >This was happenning: > >When doing O_SYNC writes, function fsync_buffers_list() submits a list of >bios to dm_raid1, the bios are added to dm_raid1 write queue and kmirrord is >woken up. > >fsync_buffers_list() calls wait_on_buffer() --- that unplugs the queue, but >there are no bios on the device queue (they are still in dm_raid1 queue) > >wait_on_buffer() starts waiting until the IO is finished. > >kmirrord is scheduled, kmirrord takes bios and submits them to the devices. > >the submitted bio plugs the harddisk queue, there is no one to unplug it >(the process that called wait_on_buffer() is already sleeping) > >So there is 3ms timeout, after which the queues on the harddisks are >unplugged, and requests are processed. > >This 3ms timeout caused that in certain workloads (O_SYNC, 8kb writes), dm-raid1is 10 times slower than md-raid1. > > >Every time we submit something asynchronously via dm_io, we must unplug the >queue to actually put the request to the device. > >This patch adds unplug call to kmirrord --- while processing requests, it keeps the queue plugged (so that adjacent bios can be merged), when it finishes >processing all bios, it unplugs the queue to submit the bios. > >It also fixes kcopyd, that has the same potential problem. All kcopyd requests >are submitted with BIO_RW_SYNC. > >Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> > >--- > >diff -p -u -r linux-2.6.18.x86_64.p2/drivers/md/dm-io.c linux-2.6.18.x86_64/drivers/md/dm-io.c >--- linux-2.6.18.x86_64.p2/drivers/md/dm-io.c 2008-08-18 14:06:33.000000000 +0200 >+++ linux-2.6.18.x86_64/drivers/md/dm-io.c 2008-08-18 15:58:51.000000000 +0200 >@@ -421,7 +421,7 @@ static int sync_io(struct dm_io_client * > { > struct io io; > >- if (num_regions > 1 && rw != WRITE) { >+ if (num_regions > 1 && (rw & RW_MASK) != WRITE) { > WARN_ON(1); > return -EIO; > } >@@ -458,7 +458,7 @@ static int async_io(struct dm_io_client > { > struct io *io; > >- if (num_regions > 1 && rw != WRITE) { >+ if (num_regions > 1 && (rw & RW_MASK) != WRITE) { > WARN_ON(1); > fn(1, context); > return -EIO; >@@ -555,6 +555,11 @@ static int dp_init(struct dm_io_request > > /* > * New collapsed (a)synchronous interface >+ * >+ * If the IO is asynchronous (i.e. it has notify.fn), you must either unplug the >+ * queue with blk_unplug() some time later or you must set the BIO_RW_SYNC bit in >+ * io_req->bi_rw. If you fail to do one of these, the IO will be submitted to >+ * the disk after q->unplug_delay, which defaults to 3ms in blk-settings.c. > */ > int dm_io(struct dm_io_request *io_req, unsigned num_regions, > struct io_region *where, unsigned long *sync_error_bits) >diff -p -u -r linux-2.6.18.x86_64.p2/drivers/md/dm-raid1.c linux-2.6.18.x86_64/drivers/md/dm-raid1.c >--- linux-2.6.18.x86_64.p2/drivers/md/dm-raid1.c 2008-08-18 15:57:05.000000000 +0200 >+++ linux-2.6.18.x86_64/drivers/md/dm-raid1.c 2008-08-18 15:58:51.000000000 +0200 >@@ -1312,6 +1312,8 @@ static void do_mirror(struct mirror_set > do_reads(ms, &reads); > do_writes(ms, &writes); > do_failures(ms, &failures); >+ >+ dm_table_unplug_all(ms->ti->table); > } > > static void do_work(void *data) >diff -p -u -r linux-2.6.18.x86_64.p2/drivers/md/kcopyd.c linux-2.6.18.x86_64/drivers/md/kcopyd.c >--- linux-2.6.18.x86_64.p2/drivers/md/kcopyd.c 2008-08-18 14:06:33.000000000 +0200 >+++ linux-2.6.18.x86_64/drivers/md/kcopyd.c 2008-08-18 15:58:51.000000000 +0200 >@@ -346,7 +346,7 @@ static int run_io_job(struct kcopyd_job > { > int r; > struct dm_io_request io_req = { >- .bi_rw = job->rw, >+ .bi_rw = job->rw | (1 << BIO_RW_SYNC), > .mem.type = DM_IO_PAGE_LIST, > .mem.ptr.pl = job->pages, > .mem.offset = job->offset,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 438153
:
314575
| 314576