Re: [PATCH 1/2] mm/memcg: try harder to decrease [memory,memsw].limit_in_bytes

2017-12-21 Thread Andrey Ryabinin
On 12/20/2017 09:15 PM, Shakeel Butt wrote: > On Wed, Dec 20, 2017 at 3:34 AM, Michal Hocko wrote: >> On Wed 20-12-17 14:32:19, Andrey Ryabinin wrote: >>> On 12/20/2017 01:33 PM, Michal Hocko wrote: On Wed 20-12-17 13:24:28, Andrey Ryabinin wrote: >

Re: [PATCH 1/2] mm/memcg: try harder to decrease [memory,memsw].limit_in_bytes

2017-12-21 Thread Andrey Ryabinin
On 12/20/2017 09:15 PM, Shakeel Butt wrote: > On Wed, Dec 20, 2017 at 3:34 AM, Michal Hocko wrote: >> On Wed 20-12-17 14:32:19, Andrey Ryabinin wrote: >>> On 12/20/2017 01:33 PM, Michal Hocko wrote: On Wed 20-12-17 13:24:28, Andrey Ryabinin wrote: > mem_cgroup_resize_[memsw]_limit()

Re: [PATCH 1/2] mm/memcg: try harder to decrease [memory,memsw].limit_in_bytes

2017-12-20 Thread Shakeel Butt
On Wed, Dec 20, 2017 at 3:34 AM, Michal Hocko wrote: > On Wed 20-12-17 14:32:19, Andrey Ryabinin wrote: >> On 12/20/2017 01:33 PM, Michal Hocko wrote: >> > On Wed 20-12-17 13:24:28, Andrey Ryabinin wrote: >> >> mem_cgroup_resize_[memsw]_limit() tries to free only 32

Re: [PATCH 1/2] mm/memcg: try harder to decrease [memory,memsw].limit_in_bytes

2017-12-20 Thread Shakeel Butt
On Wed, Dec 20, 2017 at 3:34 AM, Michal Hocko wrote: > On Wed 20-12-17 14:32:19, Andrey Ryabinin wrote: >> On 12/20/2017 01:33 PM, Michal Hocko wrote: >> > On Wed 20-12-17 13:24:28, Andrey Ryabinin wrote: >> >> mem_cgroup_resize_[memsw]_limit() tries to free only 32 (SWAP_CLUSTER_MAX) >> >> pages

Re: [PATCH 1/2] mm/memcg: try harder to decrease [memory,memsw].limit_in_bytes

2017-12-20 Thread Michal Hocko
On Wed 20-12-17 14:32:19, Andrey Ryabinin wrote: > On 12/20/2017 01:33 PM, Michal Hocko wrote: > > On Wed 20-12-17 13:24:28, Andrey Ryabinin wrote: > >> mem_cgroup_resize_[memsw]_limit() tries to free only 32 (SWAP_CLUSTER_MAX) > >> pages on each iteration. This makes practically impossible to

Re: [PATCH 1/2] mm/memcg: try harder to decrease [memory,memsw].limit_in_bytes

2017-12-20 Thread Michal Hocko
On Wed 20-12-17 14:32:19, Andrey Ryabinin wrote: > On 12/20/2017 01:33 PM, Michal Hocko wrote: > > On Wed 20-12-17 13:24:28, Andrey Ryabinin wrote: > >> mem_cgroup_resize_[memsw]_limit() tries to free only 32 (SWAP_CLUSTER_MAX) > >> pages on each iteration. This makes practically impossible to

Re: [PATCH 1/2] mm/memcg: try harder to decrease [memory,memsw].limit_in_bytes

2017-12-20 Thread Andrey Ryabinin
On 12/20/2017 01:33 PM, Michal Hocko wrote: > On Wed 20-12-17 13:24:28, Andrey Ryabinin wrote: >> mem_cgroup_resize_[memsw]_limit() tries to free only 32 (SWAP_CLUSTER_MAX) >> pages on each iteration. This makes practically impossible to decrease >> limit of memory cgroup. Tasks could easily

Re: [PATCH 1/2] mm/memcg: try harder to decrease [memory,memsw].limit_in_bytes

2017-12-20 Thread Andrey Ryabinin
On 12/20/2017 01:33 PM, Michal Hocko wrote: > On Wed 20-12-17 13:24:28, Andrey Ryabinin wrote: >> mem_cgroup_resize_[memsw]_limit() tries to free only 32 (SWAP_CLUSTER_MAX) >> pages on each iteration. This makes practically impossible to decrease >> limit of memory cgroup. Tasks could easily

Re: [PATCH 1/2] mm/memcg: try harder to decrease [memory,memsw].limit_in_bytes

2017-12-20 Thread Michal Hocko
On Wed 20-12-17 13:24:28, Andrey Ryabinin wrote: > mem_cgroup_resize_[memsw]_limit() tries to free only 32 (SWAP_CLUSTER_MAX) > pages on each iteration. This makes practically impossible to decrease > limit of memory cgroup. Tasks could easily allocate back 32 pages, > so we can't reduce memory

Re: [PATCH 1/2] mm/memcg: try harder to decrease [memory,memsw].limit_in_bytes

2017-12-20 Thread Michal Hocko
On Wed 20-12-17 13:24:28, Andrey Ryabinin wrote: > mem_cgroup_resize_[memsw]_limit() tries to free only 32 (SWAP_CLUSTER_MAX) > pages on each iteration. This makes practically impossible to decrease > limit of memory cgroup. Tasks could easily allocate back 32 pages, > so we can't reduce memory

[PATCH 1/2] mm/memcg: try harder to decrease [memory,memsw].limit_in_bytes

2017-12-20 Thread Andrey Ryabinin
mem_cgroup_resize_[memsw]_limit() tries to free only 32 (SWAP_CLUSTER_MAX) pages on each iteration. This makes practically impossible to decrease limit of memory cgroup. Tasks could easily allocate back 32 pages, so we can't reduce memory usage, and once retry_count reaches zero we return -EBUSY.

[PATCH 1/2] mm/memcg: try harder to decrease [memory,memsw].limit_in_bytes

2017-12-20 Thread Andrey Ryabinin
mem_cgroup_resize_[memsw]_limit() tries to free only 32 (SWAP_CLUSTER_MAX) pages on each iteration. This makes practically impossible to decrease limit of memory cgroup. Tasks could easily allocate back 32 pages, so we can't reduce memory usage, and once retry_count reaches zero we return -EBUSY.