> 在 2019/11/21 17:43, Pavel Begunkov 写道: >> On 11/21/2019 12:26 PM, Jackie Liu wrote: >>> 2019年11月21日 16:54,Pavel Begunkov <asml.silence@xxxxxxxxx> 写道: >>>> >>>> If there is a DRAIN in the middle of a link, it uses shadow req. Defer >>>> the next request/link instead. This: >>>> >>>> Pros: >>>> 1. removes semi-duplicated code >>>> 2. doesn't allocate memory for shadows >>>> 3. works better if only the head marked for drain >>> >>> I thought about this before, just only drain the head, but if the >>> latter IO depends >>> on the link-list, then latter IO will run in front of the link-list. >>> If we think it >>> is acceptable, then I think it is ok for me. >> >> If I got your point right, latter requests won't run ahead of the >> link-list. There shouldn't be change of behaviour. >> >> The purpose of shadow requests is to mark some request right ahead of >> the link for draining. This patch uses not a specially added shadow >> request, but the following regular one. And, as drained IO shouldn't be >> issued until every request behind completed, this should give the same >> effect. >> >> Am I missed something? > > Thanks for explaining. This is also correct, if I understand > correctly, It seems that other IOs will wait for all the links are > done. this is a little different, is it? Yes, you're right, it also was briefly stated in the patch description (see Cons). I hope, links + drain in the middle is an uncommon case. But it can be added back, but may become a little bit uglier. What do you think, should we care about this case? > > -- > Jackie Liu > > -- Pavel Begunkov