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 314575 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]
first patch
linux-2.6.18-dm-slow-mirror.patch (text/plain), 3.62 KB, created by
Mikuláš Patočka
on 2008-08-19 21:09:18 UTC
(
hide
)
Description:
first patch
Filename:
MIME Type:
Creator:
Mikuláš Patočka
Created:
2008-08-19 21:09:18 UTC
Size:
3.62 KB
patch
obsolete
>Upstream commit: a2aebe03be60ae4da03507a00d60211d5e0327c3 (2.6.26-rc1) > >Fix bugzilla 438153. > >Using schedule() or schedule_timeout() (which used to be there) would block >the process and degrade performance. > >I reworked the code to use timer: after adding something to queues, the code >must call either wake (process the queue immediatelly) or delayed_wake (process >the queue after at most 1/5s). > >Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> > >--- > >diff -p -u -r linux-2.6.18.x86_64.p1/drivers/md/dm-raid1.c linux-2.6.18.x86_64/drivers/md/dm-raid1.c >--- linux-2.6.18.x86_64.p1/drivers/md/dm-raid1.c 2008-08-18 14:06:36.000000000 +0200 >+++ linux-2.6.18.x86_64/drivers/md/dm-raid1.c 2008-08-18 15:57:05.000000000 +0200 >@@ -145,6 +145,9 @@ struct mirror_set { > struct workqueue_struct *kmirrord_wq; > struct work_struct kmirrord_work; > >+ struct timer_list timer; >+ unsigned long timer_pending; >+ > struct mirror mirror[0]; > }; > >@@ -656,6 +659,23 @@ static void bio_map_info_free(void *elem > kfree(element); > } > >+static void delayed_wake_fn(unsigned long data) >+{ >+ struct mirror_set *ms = (struct mirror_set *)data; >+ clear_bit(0, &ms->timer_pending); >+ wake(ms); >+} >+ >+static void delayed_wake(struct mirror_set *ms) >+{ >+ if (!test_and_set_bit(0, &ms->timer_pending)) { >+ ms->timer.expires = jiffies + HZ / 5; >+ ms->timer.data = (unsigned long)ms; >+ ms->timer.function = delayed_wake_fn; >+ add_timer(&ms->timer); >+ } >+} >+ > /* > * Every mirror should look like this one. > */ >@@ -1184,9 +1204,12 @@ static void do_writes(struct mirror_set > * Add bios that are delayed due to remote recovery > * back on to the write queue > */ >- spin_lock_irq(&ms->lock); >- bio_list_merge(&ms->writes, &requeue); >- spin_unlock_irq(&ms->lock); >+ if (requeue.head) { >+ spin_lock_irq(&ms->lock); >+ bio_list_merge(&ms->writes, &requeue); >+ spin_unlock_irq(&ms->lock); >+ delayed_wake(ms); >+ } > > /* > * Increment the pending counts for any regions that will >@@ -1205,6 +1228,7 @@ static void do_writes(struct mirror_set > spin_lock_irq(&ms->lock); > bio_list_merge(&ms->failures, &sync); > spin_unlock_irq(&ms->lock); >+ wake(ms); > } else { > while ((bio = bio_list_pop(&sync))) > do_write(ms, bio); >@@ -1255,7 +1279,7 @@ static void do_failures(struct mirror_se > spin_lock_irq(&ms->lock); > bio_list_merge(&ms->failures, failures); > spin_unlock_irq(&ms->lock); >- wake(ms); >+ delayed_wake(ms); > } > return; > } >@@ -1270,7 +1294,7 @@ static void do_failures(struct mirror_se > /*----------------------------------------------------------------- > * kmirrord > *---------------------------------------------------------------*/ >-static int do_mirror(struct mirror_set *ms) >+static void do_mirror(struct mirror_set *ms) > { > struct bio_list reads, writes, failures; > >@@ -1288,14 +1312,11 @@ static int do_mirror(struct mirror_set * > do_reads(ms, &reads); > do_writes(ms, &writes); > do_failures(ms, &failures); >- >- return (ms->writes.head || ms->failures.head) ? 1 : 0; > } > > static void do_work(void *data) > { >- while (do_mirror(data)) >- schedule(); >+ do_mirror(data); > } > > /*----------------------------------------------------------------- >@@ -1500,6 +1521,8 @@ static int mirror_ctr(struct dm_target * > return -ENOMEM; > } > INIT_WORK(&ms->kmirrord_work, do_work, ms); >+ init_timer(&ms->timer); >+ ms->timer_pending = 0; > > r = kcopyd_client_create(DM_IO_PAGES, &ms->kcopyd_client); > if (r) { >@@ -1516,6 +1539,7 @@ static void mirror_dtr(struct dm_target > { > struct mirror_set *ms = (struct mirror_set *) ti->private; > >+ del_timer_sync(&ms->timer); > flush_workqueue(ms->kmirrord_wq); > kcopyd_client_destroy(ms->kcopyd_client); > destroy_workqueue(ms->kmirrord_wq);
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