All of lore.kernel.org
 help / color / mirror / Atom feed
* Inject I/O latency for RAID5/6 read and writes
@ 2015-02-23 18:32 Alireza Haghdoost
  2015-03-12 21:31 ` Alireza Haghdoost
  0 siblings, 1 reply; 3+ messages in thread
From: Alireza Haghdoost @ 2015-02-23 18:32 UTC (permalink / raw)
  To: Linux RAID; +Cc: Neil Brown

I needed to inject I/O completion latency in the RAID5/6 codes for
test purpose. I was wondering where would be the good place in
md/raid5.c code to add delay ?

So far I have tried adding mdelay/udelay in raid5_end_write_request()
and it seems it works to increase I/O completion of writes. However,
adding delay in raid5_end_read_request() does not really change the
read I/O latency. Any idea ?

--Alireza

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Inject I/O latency for RAID5/6 read and writes
  2015-02-23 18:32 Inject I/O latency for RAID5/6 read and writes Alireza Haghdoost
@ 2015-03-12 21:31 ` Alireza Haghdoost
  2015-03-13 10:29   ` Sebastian Parschauer
  0 siblings, 1 reply; 3+ messages in thread
From: Alireza Haghdoost @ 2015-03-12 21:31 UTC (permalink / raw)
  To: Linux RAID; +Cc: Neil Brown

On Mon, Feb 23, 2015 at 12:32 PM, Alireza Haghdoost <alireza@cs.umn.edu> wrote:
> I needed to inject I/O completion latency in the RAID5/6 codes for
> test purpose. I was wondering where would be the good place in
> md/raid5.c code to add delay ?
>
> So far I have tried adding mdelay/udelay in raid5_end_write_request()
> and it seems it works to increase I/O completion of writes. However,
> adding delay in raid5_end_read_request() does not really change the
> read I/O latency. Any idea ?
>
> --Alireza

Can Some one help me on this issue ?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Inject I/O latency for RAID5/6 read and writes
  2015-03-12 21:31 ` Alireza Haghdoost
@ 2015-03-13 10:29   ` Sebastian Parschauer
  0 siblings, 0 replies; 3+ messages in thread
From: Sebastian Parschauer @ 2015-03-13 10:29 UTC (permalink / raw)
  To: Alireza Haghdoost, Linux RAID; +Cc: Neil Brown

On 12.03.2015 22:31, Alireza Haghdoost wrote:
> On Mon, Feb 23, 2015 at 12:32 PM, Alireza Haghdoost <alireza@cs.umn.edu> wrote:
>> I needed to inject I/O completion latency in the RAID5/6 codes for
>> test purpose. I was wondering where would be the good place in
>> md/raid5.c code to add delay ?
>>
>> So far I have tried adding mdelay/udelay in raid5_end_write_request()
>> and it seems it works to increase I/O completion of writes. However,
>> adding delay in raid5_end_read_request() does not really change the
>> read I/O latency. Any idea ?
>>
>> --Alireza
> 
> Can Some one help me on this issue ?

Everything comes through md_make_request() in drivers/md/md.c but there
are multiple different bio->bi_end_io functions. We have implemented
custom I/O latency measurement. I've posted the patch to this list some
time ago. So feel free to look how it works as an inspiration.

http://www.spinics.net/lists/raid/msg46525.html

It introduces its own struct md_bio_private containing the original
bi_end_io function pointer and introduces the md_bio_endio() function as
a generic bi_end_io to be always called before calling the original
bi_end_io function.

I hope this helps! We've reworked this stuff since then a bit more but
it's really beneficial to detect disks which became slow.

Cheers,
Sebastian

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-03-13 10:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-23 18:32 Inject I/O latency for RAID5/6 read and writes Alireza Haghdoost
2015-03-12 21:31 ` Alireza Haghdoost
2015-03-13 10:29   ` Sebastian Parschauer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.