mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-23 22:25:40 +08:00
RDS: add stat for socket recv memory usage
Tracks the receive side memory added to scokets and removed from sockets. Signed-off-by: Venkat Venkatsubra <venkat.x.venkatsubra@oracle.com> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
This commit is contained in:
parent
cf657269d3
commit
192a798f52
@ -631,6 +631,9 @@ struct rds_statistics {
|
||||
uint64_t s_cong_update_received;
|
||||
uint64_t s_cong_send_error;
|
||||
uint64_t s_cong_send_blocked;
|
||||
uint64_t s_recv_bytes_added_to_socket;
|
||||
uint64_t s_recv_bytes_removed_from_socket;
|
||||
|
||||
};
|
||||
|
||||
/* af_rds.c */
|
||||
|
@ -94,6 +94,10 @@ static void rds_recv_rcvbuf_delta(struct rds_sock *rs, struct sock *sk,
|
||||
return;
|
||||
|
||||
rs->rs_rcv_bytes += delta;
|
||||
if (delta > 0)
|
||||
rds_stats_add(s_recv_bytes_added_to_socket, delta);
|
||||
else
|
||||
rds_stats_add(s_recv_bytes_removed_from_socket, -delta);
|
||||
now_congested = rs->rs_rcv_bytes > rds_sk_rcvbuf(rs);
|
||||
|
||||
rdsdebug("rs %p (%pI4:%u) recv bytes %d buf %d "
|
||||
|
Loading…
Reference in New Issue
Block a user