[[PATCH v1] 26/37] [CIFS] SMBD: Send an immediate packet when it's needed

Tom Talpey ttalpey at microsoft.com
Mon Aug 14 21:15:33 UTC 2017


> -----Original Message-----
> From: linux-cifs-owner at vger.kernel.org [mailto:linux-cifs-
> owner at vger.kernel.org] On Behalf Of Long Li
> Sent: Wednesday, August 2, 2017 4:11 PM
> To: Steve French <sfrench at samba.org>; linux-cifs at vger.kernel.org; samba-
> technical at lists.samba.org; linux-kernel at vger.kernel.org
> Cc: Long Li <longli at microsoft.com>
> Subject: [[PATCH v1] 26/37] [CIFS] SMBD: Send an immediate packet when it's
> needed
> 
> +/*
> + * Check and schedule to send an immediate packet
> + * This is used to extend credtis to remote peer to keep the transport busy
> + */
> +static void check_and_send_immediate(struct cifs_rdma_info *info)
> +{
> +       info->send_immediate = true;
> +
> +       // promptly send a packet if running low on receive credits

...if *our peer* is running low on credits.

> +       if (atomic_read(&info->receive_credits) <
> +           atomic_read(&info->receive_credit_target) -1 )

Why read the receive_credit_target atomically? It's a mostly unchanging local value?

Tom.



More information about the samba-technical mailing list