Re: [PATCH 08/14] net: tcp_memcontrol: sanitize tcp memory accounting callbacks

2015-11-20 Thread Johannes Weiner
On Fri, Nov 20, 2015 at 01:58:57PM +0300, Vladimir Davydov wrote: > On Thu, Nov 12, 2015 at 06:41:27PM -0500, Johannes Weiner wrote: > > There won't be a tcp control soft limit, so integrating the memcg code > > into the global skmem limiting scheme complicates things > > unnecessarily. Replace thi

Re: [PATCH 08/14] net: tcp_memcontrol: sanitize tcp memory accounting callbacks

2015-11-20 Thread Vladimir Davydov
On Thu, Nov 12, 2015 at 06:41:27PM -0500, Johannes Weiner wrote: > There won't be a tcp control soft limit, so integrating the memcg code > into the global skmem limiting scheme complicates things > unnecessarily. Replace this with simple and clear charge and uncharge > calls--hidden behind a jump

Re: [PATCH 08/14] net: tcp_memcontrol: sanitize tcp memory accounting callbacks

2015-11-12 Thread Johannes Weiner
On Thu, Nov 12, 2015 at 08:53:38PM -0800, Eric Dumazet wrote: > On Thu, 2015-11-12 at 18:41 -0500, Johannes Weiner wrote: > > @@ -711,6 +705,12 @@ static inline void mem_cgroup_wb_stats(struct > > bdi_writeback *wb, > > struct sock; > > void sock_update_memcg(struct sock *sk); > > void sock_rel

Re: [PATCH 08/14] net: tcp_memcontrol: sanitize tcp memory accounting callbacks

2015-11-12 Thread Eric Dumazet
On Thu, 2015-11-12 at 18:41 -0500, Johannes Weiner wrote: > @@ -711,6 +705,12 @@ static inline void mem_cgroup_wb_stats(struct > bdi_writeback *wb, > struct sock; > void sock_update_memcg(struct sock *sk); > void sock_release_memcg(struct sock *sk); > +bool mem_cgroup_charge_skmem(struct cg_p

[PATCH 08/14] net: tcp_memcontrol: sanitize tcp memory accounting callbacks

2015-11-12 Thread Johannes Weiner
There won't be a tcp control soft limit, so integrating the memcg code into the global skmem limiting scheme complicates things unnecessarily. Replace this with simple and clear charge and uncharge calls--hidden behind a jump label--to account skb memory. Note that this is not purely aesthetic: as