lkml.org 
[lkml]   [2015]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/9] IB: add a proper completion queue abstraction
From
Date
On 11/23/2015 02:18 PM, Jason Gunthorpe wrote:
> On Mon, Nov 23, 2015 at 01:54:05PM -0800, Bart Van Assche wrote:
> What I don't see is how SRP handles things when the
> sendq fills up, ie the case where __srp_get_tx_iu() == NULL. It looks
> like the driver starts to panic and generates printks. I can't tell if
> it can survive that, but it doesn't look very good..

Hello Jason,

From srp_cm_rep_handler():

target->scsi_host->can_queue
= min(ch->req_lim - SRP_TSK_MGMT_SQ_SIZE,
target->scsi_host->can_queue);

In other words, the SCSI core is told to ensure that the number of
outstanding SCSI commands is one less than the number of elements in the
ch->free_tx list. And since the SRP initiator serializes task management
requests it is guaranteed that __srp_get_tx_iu() won't fail due to
ch->free_tx being empty.

Bart.



\
 
 \ /
  Last update: 2015-11-24 00:01    [W:0.113 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site