libsas - sas_queue's policy of re-queuing all the tasks ...
Hello,
I've a question regarding the libsas core.
So, sas_queue() will dispatch the coalesced tasks. It then invokes the SAS_LLDD's execute_task. Let's assume mv_sas driver.In this case mvs_task_exec(). Say, it received 'N' tasks the first time it was called.However, the LLDD was only able to service M tasks(where M<N). Now it will return rc(non-zero value). sas_queue will then requeue all the tasks. But only (N-M) tasks should have been queued, correct? So why are we re-trying all the tasks again?
PS - If folks are on SCST mailing list too then do not confuse this post with my SCST post. There, the target maintainer can see if the target driver has to worry about this.
Chetan Loke
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 17 lines · 王金浦
2009/12/24 Chetan Loke <[email protected]>
Quoted 5 lines
Hello,
I've a question regarding the libsas core.
Quoted 8 lines
So,
sas_queue()will dispatch the coalesced tasks. It then invokes the SAS_LLDD'sexecute_task. Let's assumemv_sasdriver.In this casemvs_task_exec(). Say, it received 'N' tasks the first time it was called.However, the LLDD was only able to service M tasks(where M<N). Now it will return rc(non-zero value).sas_queuewill then requeue all the tasks. But only (N-M) tasks should have been queued, correct? So why are we re-trying all the tasks again?
Quoted 4 lines
if you see the code , at
mv_init, in functionmvs_post_sas_ha_initsetsha->lldd_max_execute_num= 1;
and libsas invokesas_queue_upwhensha->lldd_max_execute_num> 1 .
Ignore the max_execute_num for this discussion. What I'm saying is, if you do 'coalesce' the tasks.mv_sas core clearly has 256+ slots in their adapter. That means you could coalesce them. Well, that's not the point.
What I would like to know is why does the libsas core wants to requeue all the tasks?
What was the rationale behind this logic?
Quoted 2 lines
Jack Wang
Chetan Loke