mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 16:44:58 +02:00
smb: client: make use of smbdirect_socket.statistics
This will allow us to use common functions soon. Note this generates the following warnings from scripts/checkpatch.pl --quiet: WARNING: quoted string split across lines #59: FILE: fs/smb/client/cifs_debug.c:481: + seq_printf(m, "\nDebug count_get_receive_buffer: %llu " + "count_put_receive_buffer: %llu count_send_empty: %llu", WARNING: quoted string split across lines #66: FILE: fs/smb/client/cifs_debug.c:486: seq_printf(m, "\nRead Queue " + "count_enqueue_reassembly_queue: %llu " WARNING: quoted string split across lines #67: FILE: fs/smb/client/cifs_debug.c:487: + "count_enqueue_reassembly_queue: %llu " + "count_dequeue_reassembly_queue: %llu " total: 0 errors, 3 warnings, 83 lines checked scripts/checkpatch.pl: FAILED But I left them in there, because it matches the code arround it... Cc: Steve French <smfrench@gmail.com> Cc: Tom Talpey <tom@talpey.com> Cc: Long Li <longli@microsoft.com> Cc: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Acked-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
parent
2449c7cc9b
commit
ddfcb069c1
|
|
@ -477,18 +477,18 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
|
|||
sp->keepalive_interval_msec * 1000,
|
||||
sp->max_read_write_size,
|
||||
server->smbd_conn->rdma_readwrite_threshold);
|
||||
seq_printf(m, "\nDebug count_get_receive_buffer: %u "
|
||||
"count_put_receive_buffer: %u count_send_empty: %u",
|
||||
server->smbd_conn->count_get_receive_buffer,
|
||||
server->smbd_conn->count_put_receive_buffer,
|
||||
server->smbd_conn->count_send_empty);
|
||||
seq_printf(m, "\nDebug count_get_receive_buffer: %llu "
|
||||
"count_put_receive_buffer: %llu count_send_empty: %llu",
|
||||
sc->statistics.get_receive_buffer,
|
||||
sc->statistics.put_receive_buffer,
|
||||
sc->statistics.send_empty);
|
||||
seq_printf(m, "\nRead Queue "
|
||||
"count_enqueue_reassembly_queue: %u "
|
||||
"count_dequeue_reassembly_queue: %u "
|
||||
"count_enqueue_reassembly_queue: %llu "
|
||||
"count_dequeue_reassembly_queue: %llu "
|
||||
"reassembly_data_length: %u "
|
||||
"reassembly_queue_length: %u",
|
||||
server->smbd_conn->count_enqueue_reassembly_queue,
|
||||
server->smbd_conn->count_dequeue_reassembly_queue,
|
||||
sc->statistics.enqueue_reassembly_queue,
|
||||
sc->statistics.dequeue_reassembly_queue,
|
||||
sc->recv_io.reassembly.data_length,
|
||||
sc->recv_io.reassembly.queue_length);
|
||||
seq_printf(m, "\nCurrent Credits send_credits: %u "
|
||||
|
|
|
|||
|
|
@ -1212,9 +1212,10 @@ static int smbd_post_send_iter(struct smbd_connection *info,
|
|||
*/
|
||||
static int smbd_post_send_empty(struct smbd_connection *info)
|
||||
{
|
||||
struct smbdirect_socket *sc = &info->socket;
|
||||
int remaining_data_length = 0;
|
||||
|
||||
info->count_send_empty++;
|
||||
sc->statistics.send_empty++;
|
||||
return smbd_post_send_iter(info, NULL, &remaining_data_length);
|
||||
}
|
||||
|
||||
|
|
@ -1353,7 +1354,7 @@ static void enqueue_reassembly(
|
|||
virt_wmb();
|
||||
sc->recv_io.reassembly.data_length += data_length;
|
||||
spin_unlock(&sc->recv_io.reassembly.lock);
|
||||
info->count_enqueue_reassembly_queue++;
|
||||
sc->statistics.enqueue_reassembly_queue++;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -1392,7 +1393,7 @@ static struct smbdirect_recv_io *get_receive_buffer(struct smbd_connection *info
|
|||
&sc->recv_io.free.list,
|
||||
struct smbdirect_recv_io, list);
|
||||
list_del(&ret->list);
|
||||
info->count_get_receive_buffer++;
|
||||
sc->statistics.get_receive_buffer++;
|
||||
}
|
||||
spin_unlock_irqrestore(&sc->recv_io.free.lock, flags);
|
||||
|
||||
|
|
@ -1421,7 +1422,7 @@ static void put_receive_buffer(
|
|||
|
||||
spin_lock_irqsave(&sc->recv_io.free.lock, flags);
|
||||
list_add_tail(&response->list, &sc->recv_io.free.list);
|
||||
info->count_put_receive_buffer++;
|
||||
sc->statistics.put_receive_buffer++;
|
||||
spin_unlock_irqrestore(&sc->recv_io.free.lock, flags);
|
||||
|
||||
queue_work(info->workqueue, &sc->recv_io.posted.refill_work);
|
||||
|
|
@ -2078,7 +2079,7 @@ int smbd_recv(struct smbd_connection *info, struct msghdr *msg)
|
|||
&sc->recv_io.reassembly.lock);
|
||||
}
|
||||
queue_removed++;
|
||||
info->count_dequeue_reassembly_queue++;
|
||||
sc->statistics.dequeue_reassembly_queue++;
|
||||
put_receive_buffer(info, response);
|
||||
offset = 0;
|
||||
log_read(INFO, "put_receive_buffer offset=0\n");
|
||||
|
|
|
|||
|
|
@ -62,13 +62,6 @@ struct smbd_connection {
|
|||
wait_queue_head_t wait_for_mr_cleanup;
|
||||
|
||||
struct workqueue_struct *workqueue;
|
||||
|
||||
/* for debug purposes */
|
||||
unsigned int count_get_receive_buffer;
|
||||
unsigned int count_put_receive_buffer;
|
||||
unsigned int count_enqueue_reassembly_queue;
|
||||
unsigned int count_dequeue_reassembly_queue;
|
||||
unsigned int count_send_empty;
|
||||
};
|
||||
|
||||
/* Create a SMBDirect session */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user