Skip to content

Commit 1ae9a5a

Browse files
committed
smb3: dump in_send and num_waiters stats counters by default
Number of requests in_send and the number of waiters on sendRecv are useful counters in various cases, move them from CONFIG_CIFS_STATS2 to be on by default especially with multichannel Signed-off-by: Steve French <[email protected]> Acked-by: Ronnie Sahlberg <[email protected]>
1 parent 65a37a3 commit 1ae9a5a

File tree

2 files changed

+4
-21
lines changed

2 files changed

+4
-21
lines changed

fs/cifs/cifs_debug.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,11 +365,10 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
365365
server->srv_count,
366366
server->sec_mode, in_flight(server));
367367

368-
#ifdef CONFIG_CIFS_STATS2
369368
seq_printf(m, " In Send: %d In MaxReq Wait: %d",
370369
atomic_read(&server->in_send),
371370
atomic_read(&server->num_waiters));
372-
#endif
371+
373372
/* dump session id helpful for use with network trace */
374373
seq_printf(m, " SessionId: 0x%llx", ses->Suid);
375374
if (ses->session_flags & SMB2_SESSION_FLAG_ENCRYPT_DATA)

fs/cifs/cifsglob.h

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -743,12 +743,12 @@ struct TCP_Server_Info {
743743
/* Total size of this PDU. Only valid from cifs_demultiplex_thread */
744744
unsigned int pdu_size;
745745
unsigned int total_read; /* total amount of data read in this pass */
746+
atomic_t in_send; /* requests trying to send */
747+
atomic_t num_waiters; /* blocked waiting to get in sendrecv */
746748
#ifdef CONFIG_CIFS_FSCACHE
747749
struct fscache_cookie *fscache; /* client index cache cookie */
748750
#endif
749751
#ifdef CONFIG_CIFS_STATS2
750-
atomic_t in_send; /* requests trying to send */
751-
atomic_t num_waiters; /* blocked waiting to get in sendrecv */
752752
atomic_t num_cmds[NUMBER_OF_SMB2_COMMANDS]; /* total requests by cmd */
753753
atomic_t smb2slowcmd[NUMBER_OF_SMB2_COMMANDS]; /* count resps > 1 sec */
754754
__u64 time_per_cmd[NUMBER_OF_SMB2_COMMANDS]; /* total time per cmd */
@@ -1606,8 +1606,6 @@ struct close_cancelled_open {
16061606

16071607
/* Make code in transport.c a little cleaner by moving
16081608
update of optional stats into function below */
1609-
#ifdef CONFIG_CIFS_STATS2
1610-
16111609
static inline void cifs_in_send_inc(struct TCP_Server_Info *server)
16121610
{
16131611
atomic_inc(&server->in_send);
@@ -1628,26 +1626,12 @@ static inline void cifs_num_waiters_dec(struct TCP_Server_Info *server)
16281626
atomic_dec(&server->num_waiters);
16291627
}
16301628

1629+
#ifdef CONFIG_CIFS_STATS2
16311630
static inline void cifs_save_when_sent(struct mid_q_entry *mid)
16321631
{
16331632
mid->when_sent = jiffies;
16341633
}
16351634
#else
1636-
static inline void cifs_in_send_inc(struct TCP_Server_Info *server)
1637-
{
1638-
}
1639-
static inline void cifs_in_send_dec(struct TCP_Server_Info *server)
1640-
{
1641-
}
1642-
1643-
static inline void cifs_num_waiters_inc(struct TCP_Server_Info *server)
1644-
{
1645-
}
1646-
1647-
static inline void cifs_num_waiters_dec(struct TCP_Server_Info *server)
1648-
{
1649-
}
1650-
16511635
static inline void cifs_save_when_sent(struct mid_q_entry *mid)
16521636
{
16531637
}

0 commit comments

Comments
 (0)