drbd-dev Digest, Vol 133, Issue 7
I have known more request_timer_fn(). Thanks
I think helper function *time_min_in_future() *function will return the nearest future time, right?
And, next_trigger_time is initialize now value, so always is same. void request_timer_fn(unsigned long data)
{
if (dt) {...
if (device->disk_state[NOW] > D_FAILED) {
next_trigger_time = *time_min_in_future*(now,
next_trigger_time, oldest_submit_jif + dt); //
1st assign
restart_timer = true;
}
...
}
for_each_connection(connection, device->resource) {...
next_trigger_time = *time_min_in_future*(now,
next_trigger_time, pre_send_jif + ent); //
2nd assign
...
}
...
if (restart_timer) {
next_trigger_time = *time_min_in_future*(now, next_trigger_time,
now + et); // 3rd assign
...
} }
Maybe, 3 assignments are always same, because now == next_trigger_time, which is the nearest.
So, if restart_timer 's value is true, then loop continuously even dt or ent exists.
I don't know how to put the different thing.
Thanks.
2016-03-11 20:00 GMT+09:00 <[email protected]>:
Quoted 128 lines
Send drbd-dev mailing list submissions to
[email protected]To subscribe or unsubscribe via the World Wide Web, visit
http://lists.linbit.com/mailman/listinfo/drbd-dev
or, via email, send a message with subject or body 'help' to
[email protected]You can reach the person managing the list at
[email protected]When replying, please edit your Subject line so it is more specific than "Re: Contents of drbd-dev digest..."
Today's Topics:
1. Re:
request_timercontinuous loop if there is disk-timeout
(Lars Ellenberg)----------------------------------------------------------------------
Message: 1
Date: Fri, 11 Mar 2016 11:02:35 +0100
From: Lars Ellenberg <[email protected]>
Subject: Re: [Drbd-dev]request_timercontinuous loop if there is
disk-timeout
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8Quoted 20 lines · ???
Hello.
I'm a software engineer in Mantech.In testing about disk-timeout property,
if not default value, which will lead into a continuous loop.in
request_timer_fn()
...
if (device->disk_state[NOW] >D_FAILED) {
et =min_not_zero(et, dt);next_trigger_time=time_min_in_future(now, next_trigger_time, oldest_submit_jif + dt);restart_timer= true;
}
...
I think, if there is no request,next_trigger_timeshould be calculated belownext_trigger_time=time_min_in_future(now, next_trigger_time + *dt*, oldest_submit_jif + dt);Quoted 1 line
However, I can't be sure.
"dt" : disk timeout
"et" : effective timeout
"ent" : effective network timeout
"now" : well, now.
"next_trigger_time" : when to trigger the next timer
next_trigger_timeis initialized to "now".it gets adjusted using "
time_min_in_future()", which is this helper:
static unsigned long time_min_in_future(unsigned long now,
unsigned long t1, unsigned long t2){ t1 = time_after(now, t1) ? now : t1; t2 = time_after(now, t2) ? now : t2; return time_after(t1, t2) ? t2 : t1; }
time_afteris ((long)((b) - (a)) < 0)), NOT <=.
next_trigger_timewill become larger than now,
or stay at its initial value, which is now.function ends with
if (
restart_timer) {
next_trigger_time= time_min_in_future(now,next_trigger_time, now + et); mod_timer(&device->request_timer, next_trigger_time); }so in case
next_trigger_timewill still be equal to now at the end of the function, it will be set to "now + et" before it is passed tomod_timer.et can only be zero if both network and disk timeout where zero, in which case the whole thing would not even be used, because that would mean timeouts are disabled.
Besides that,
I would be surprised if disk timeout in 9 worked properly yet.Also, disk timeout is evil in any case, and NOT TO BE USED (not even in 8.4, where it *does* work properly ("as designed"), afaik)
Why? Because if it triggers, and the IO subsystem ("disk") decides to still process the submitted request some time later,
you'd get stuff RDMA'd to some random memory page which may well be meanwhile
re-used for unrelated things. In which case we intentionallypanic().But you knew that already.
--
: Lars Ellenberg
: LINBIT | Keeping the Digital World Running
: DRBD -- Heartbeat -- Corosync -- Pacemaker
: R&D, Integration, Ops, Consulting, SupportDRBD? and LINBIT? are registered trademarks of LINBIT
------------------------------
_______________________________________________
drbd-dev mailing list
[email protected]
http://lists.linbit.com/mailman/listinfo/drbd-devEnd of drbd-dev Digest, Vol 133, Issue 7
****************************************
Signature · 7 lines
기술연구소 Mobile : 010-4762-0519 *박 경 민 차장* [email protected] 서울특별시 성동구 성수일로4길 25 서울숲코오롱디지털타워 12층 Fax : 02-575-4858 / Tel : (02) 2136-6978 (978)
Lars Ellenberg
maintainerRe: [Drbd-dev] request_timer continuous loop if there is disk-timeout
Quoted 29 lines · 박경민
I have known more
request_timer_fn(). ThanksI think helper function
*time_min_in_future()*function will return the nearest future time, right?
And,next_trigger_timeis initialize now value, so always is same. voidrequest_timer_fn(unsigned long data){ if (dt) {...
if (device->disk_state[NOW] >D_FAILED) {
next_trigger_time= *time_min_in_future*(now,
next_trigger_time,oldest_submit_jif+ dt); //
1st assignrestart_timer = true; } ... } for_each_connection(connection, device->resource) {...
next_trigger_time= *time_min_in_future*(now,
next_trigger_time,pre_send_jif+ ent); //
2nd assign
...}...
if (restart_timer) {
next_trigger_time= *time_min_in_future*(now,next_trigger_time,
now + et); // 3rd assign
...
Quoted 5 lines
} }Maybe, 3 assignments are always same, because now ==
next_trigger_time, which is the nearest. So, ifrestart_timer's value is true, then loop continuously even dt or ent exists.
No.
Quoted 1 line
I don't know how to put the different thing.
Me neither.
Also, you have seen this?
Quoted 2 lines
Quoted 2 lines
When replying, please edit your Subject line so it is more specific than "Re: Contents of drbd-dev digest..."