Re: [patch 8/8] memcg: sanitize __mem_cgroup_try_charge() call protocol

2014-03-12 Thread Michal Hocko
On Wed 12-03-14 15:01:38, Michal Hocko wrote: > On Tue 11-03-14 21:28:34, Johannes Weiner wrote: > > Some callsites pass a memcg directly, some callsites pass a mm that > > first has to be translated to an mm. This makes for a terrible > > function interface. > > > > Just push the mm-to-memcg

Re: [patch 8/8] memcg: sanitize __mem_cgroup_try_charge() call protocol

2014-03-12 Thread Michal Hocko
On Tue 11-03-14 21:28:34, Johannes Weiner wrote: > Some callsites pass a memcg directly, some callsites pass a mm that > first has to be translated to an mm. This makes for a terrible > function interface. > > Just push the mm-to-memcg translation into the respective callsites > and always pass

Re: [patch 8/8] memcg: sanitize __mem_cgroup_try_charge() call protocol

2014-03-12 Thread Michal Hocko
On Tue 11-03-14 21:28:34, Johannes Weiner wrote: Some callsites pass a memcg directly, some callsites pass a mm that first has to be translated to an mm. This makes for a terrible function interface. Just push the mm-to-memcg translation into the respective callsites and always pass a

Re: [patch 8/8] memcg: sanitize __mem_cgroup_try_charge() call protocol

2014-03-12 Thread Michal Hocko
On Wed 12-03-14 15:01:38, Michal Hocko wrote: On Tue 11-03-14 21:28:34, Johannes Weiner wrote: Some callsites pass a memcg directly, some callsites pass a mm that first has to be translated to an mm. This makes for a terrible function interface. Just push the mm-to-memcg translation

[patch 8/8] memcg: sanitize __mem_cgroup_try_charge() call protocol

2014-03-11 Thread Johannes Weiner
Some callsites pass a memcg directly, some callsites pass a mm that first has to be translated to an mm. This makes for a terrible function interface. Just push the mm-to-memcg translation into the respective callsites and always pass a memcg to mem_cgroup_try_charge(). Signed-off-by: Johannes

[patch 8/8] memcg: sanitize __mem_cgroup_try_charge() call protocol

2014-03-11 Thread Johannes Weiner
Some callsites pass a memcg directly, some callsites pass a mm that first has to be translated to an mm. This makes for a terrible function interface. Just push the mm-to-memcg translation into the respective callsites and always pass a memcg to mem_cgroup_try_charge(). Signed-off-by: Johannes

Re: [patch 8/8] memcg: sanitize __mem_cgroup_try_charge() call protocol

2014-02-10 Thread Michal Hocko
On Fri 07-02-14 12:04:25, Johannes Weiner wrote: > Some callsites pass a memcg directly, some callsites pass a mm that > first has to be translated to an mm. This makes for a terrible > function interface. > > Just push the mm-to-memcg translation into the respective callsites > and always pass

Re: [patch 8/8] memcg: sanitize __mem_cgroup_try_charge() call protocol

2014-02-10 Thread Michal Hocko
On Fri 07-02-14 12:04:25, Johannes Weiner wrote: Some callsites pass a memcg directly, some callsites pass a mm that first has to be translated to an mm. This makes for a terrible function interface. Just push the mm-to-memcg translation into the respective callsites and always pass a

[patch 8/8] memcg: sanitize __mem_cgroup_try_charge() call protocol

2014-02-07 Thread Johannes Weiner
Some callsites pass a memcg directly, some callsites pass a mm that first has to be translated to an mm. This makes for a terrible function interface. Just push the mm-to-memcg translation into the respective callsites and always pass a memcg to mem_cgroup_try_charge(). Signed-off-by: Johannes

[patch 8/8] memcg: sanitize __mem_cgroup_try_charge() call protocol

2014-02-07 Thread Johannes Weiner
Some callsites pass a memcg directly, some callsites pass a mm that first has to be translated to an mm. This makes for a terrible function interface. Just push the mm-to-memcg translation into the respective callsites and always pass a memcg to mem_cgroup_try_charge(). Signed-off-by: Johannes