Skip to content

Commit 07475ff

Browse files
author
Steve French
committed
[CIFS] Display large/small total buffer allocations in /proc/fs/cifs/Stats
when CONFIG_CIFS_STATS2 is on (helps in debugging performance) Signed-off-by: Steve French <[email protected]>
1 parent 4498eed commit 07475ff

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

fs/cifs/cifs_debug.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,14 @@ cifs_stats_read(char *buf, char **beginBuffer, off_t offset,
280280
smBufAllocCount.counter,cifs_min_small);
281281
length += item_length;
282282
buf += item_length;
283+
#ifdef CONFIG_CIFS_STATS2
284+
item_length = sprintf(buf, "Total Large %d Small %d Allocations\n",
285+
atomic_read(&totBufAllocCount),
286+
atomic_read(&totSmBufAllocCount));
287+
length += item_length;
288+
buf += item_length;
289+
#endif /* CONFIG_CIFS_STATS2 */
290+
283291
item_length =
284292
sprintf(buf,"Operations (MIDs): %d\n",
285293
midCount.counter);

0 commit comments

Comments
 (0)