<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2016-03-10 23:04 GMT+09:00 Lars Ellenberg <span dir="ltr"><<a href="mailto:lars.ellenberg@linbit.com" target="_blank">lars.ellenberg@linbit.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div>On Thu, Mar 10, 2016 at 09:39:46PM +0900, Jaeheon Kim wrote:<br>
> 2. Sources<br>
><br>
> 1) Ver 9.0.1<br>
><br>
> static inline void inc_ap_bio(struct drbd_device *device, int rw)<br>
> {<br>
> wait_event(device->misc_wait, inc_ap_bio_cond(device, rw));<br>
> }<br>
><br>
> static inline void dec_ap_bio(struct drbd_device *device, int rw)<br>
> {<br>
> int ap_bio = atomic_dec_return(&device->ap_bio_cnt[rw]);<br>
> .........<br>
><br>
> if (ap_bio == 0)<br>
> wake_up(&device->misc_wait);<br>
> }<br>
><br>
><br>
> 2) Ver 8.4.7<br>
><br>
> static inline void inc_ap_bio(struct drbd_device *device)<br>
> {<br>
> wait_event(device->misc_wait, inc_ap_bio_cond(device));<br>
> }<br>
><br>
> static inline void dec_ap_bio(struct drbd_device *device)<br>
> {<br>
> int mxb = drbd_get_max_buffers(device);<br>
> int ap_bio = atomic_dec_return(&device->ap_bio_cnt);<br>
><br>
> .............<br>
><br>
><br>
> /* this currently does wake_up for every dec_ap_bio!<br>
> * maybe rather introduce some type of hysteresis?<br>
> * e.g. (ap_bio == mxb/2 || ap_bio == 0) ? */<br>
><br>
> if (ap_bio < mxb)<br>
> wake_up(&device->misc_wait);<br>
> }<br>
><br>
><br>
><br>
> 3. Questions<br>
><br>
> 1) See "1. Stacks".<br>
> I think, The Linux "drbd_make_request+0x14a/0x360 [drbd]" will probably<br>
> mean the same thing as the Windows "drbd!inc_ap_bio+0x49".<br>
> What do you think about it?<br>
><br>
> 2) In version 8.4.7, dec_ap_bio wakes up misc_wait when condition is<br>
> "ap_bio < max".<br>
> I mean, this version has greater tolerance than version 9.0.1.<br>
> My question is Why do you change this condition from "ap_bio < max" to<br>
> "ap_bio == 0" in version 9.0.1?<br>
<br>
<br>
</div></div>Because there is no more "max" in 9, no-one can possibly wait for<br>
count < max. There are however things that still wait for count == 0.<br>
<br></blockquote><div><br></div><div>I see.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Though we probably will re-introduce some (resource wide) limit<br>
on the maximum amount of "in-flight bios" we accept to be queued.<br>
<br></blockquote><div><br></div><div>Could you explain more detail?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
"misc" wait queue is used for a lot of things,<br>
and a lot of things wake it.<br>
<span><font color="#888888"><br></font></span></blockquote><div><br></div><div>Yes, I know that.</div><div><div><div>However, conversely, if anyone do not wake up to this "misc", this pending case could be occurred.</div><div>This case had generated during the big file copy. And you can see <span style="color:rgb(0,0,0)">"drbd_make_request+0x14a/0x360 [drbd]" at Linux stack</span> which is similar Windows.</div><div>So I doubt whether inc_ap_bio is pending forever because the wake-up condition failed at this dec_ap_bio function.</div><div><br></div><div>Anyway, Did you reproduce it in Linux?</div></div><div><br></div><div>Thanks.</div><div><br></div></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span><font color="#888888">
<br>
--<br>
: Lars Ellenberg<br>
: LINBIT | Keeping the Digital World Running<br>
: DRBD -- Heartbeat -- Corosync -- Pacemaker<br>
: R&D, Integration, Ops, Consulting, Support<br>
<br>
DRBD® and LINBIT® are registered trademarks of LINBIT<br>
_______________________________________________<br>
drbd-dev mailing list<br>
<a href="mailto:drbd-dev@lists.linbit.com" target="_blank">drbd-dev@lists.linbit.com</a><br>
<a href="http://lists.linbit.com/mailman/listinfo/drbd-dev" rel="noreferrer" target="_blank">http://lists.linbit.com/mailman/listinfo/drbd-dev</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><p style="margin:0cm 0cm 0pt"><img src="cid:image001.png@01D0F522.B2A586F0" alt="설명: logo"><span lang="EN-US" style="color:black;font-size:10pt;font-family:verdana,sans-serif"> </span><span lang="EN-US" style="color:black;font-size:10pt;font-family:verdana,sans-serif"> </span></p><p style="margin:0cm 0cm 0pt"></p><p style="margin:0cm 0cm 0.0001pt;background-image:initial;background-repeat:initial"><font face="verdana, sans-serif"><b><span style="color:black"><span lang="EN-US">JaeHeon Kim. Director<span style="font-size:10pt"> jhkim</span></span></span></b><span lang="EN-US" style="font-size:10pt;color:black">@<a href="http://mantech.co.kr/" style="color:rgb(17,85,204)" target="_blank">mantech.co.kr</a></span></font></p><p style="margin:0cm 0cm 0.0001pt;line-height:21px"><span lang="EN-US" style="font-size:8pt;line-height:16px;font-family:'\00b9d1\00c740 \00ace0\00b515';color:rgb(127,127,127)"><img src="cid:ii_150a68c3811acf54" alt="본문 이미지 1" width="400" height="160" style="color: rgb(34, 34, 34); font-family: arial, sans-serif; font-size: 14px; line-height: normal;"><br></span></p></div></div></div></div></div></div>
</div></div>