Xin Long 9dde27de3e sctp: implement memory accounting on rx path
sk_forward_alloc's updating is also done on rx path, but to be consistent
we change to use sk_mem_charge() in sctp_skb_set_owner_r().

In sctp_eat_data(), it's not enough to check sctp_memory_pressure only,
which doesn't work for mem_cgroup_sockets_enabled, so we change to use
sk_under_memory_pressure().

When it's under memory pressure, sk_mem_reclaim() and sk_rmem_schedule()
should be called on both RENEGE or CHUNK DELIVERY path exit the memory
pressure status as soon as possible.

Note that sk_rmem_schedule() is using datalen to make things easy there.

Reported-by: Matteo Croce <mcroce@redhat.com>
Tested-by: Matteo Croce <mcroce@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-15 13:36:51 -07:00
..
2018-09-08 01:39:47 +09:00
2018-01-19 14:02:12 -05:00
2019-02-21 16:23:56 -08:00
2019-01-23 11:18:00 -08:00
2018-09-26 20:22:19 -07:00
2018-07-30 09:10:25 -07:00
2019-03-21 13:39:25 -07:00
2018-02-28 11:43:28 -05:00
2018-04-23 10:21:24 -04:00
2019-02-13 21:07:47 -08:00
2017-10-11 09:49:34 +02:00
2017-12-11 14:10:06 -05:00
2019-02-25 14:32:35 -08:00
2018-09-13 09:04:58 -07:00
2018-04-07 22:32:31 -04:00
2017-11-08 16:12:33 +09:00
2018-09-25 20:17:35 -07:00
2017-12-05 14:37:13 -05:00
2018-05-16 07:23:35 +02:00
2018-06-22 13:43:27 +09:00
2018-12-20 16:56:04 -08:00
2018-08-29 12:25:53 -07:00