Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1586594

Re: [PATCH 2/2] mm/cgroup: delay soft limit data allocation

From Balbir Singh <bsingharora@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] mm/cgroup: delay soft limit data allocation
Date 2017-02-23 02:30 +0100
Message-ID <tdQoh-2cp-5@gated-at.bofh.it> (permalink)
References <tdHuF-40t-11@gated-at.bofh.it> <tdHuF-40t-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Feb 22, 2017 at 04:58:11PM +0100, Laurent Dufour wrote:
> Until a soft limit is set to a cgroup, the soft limit data are useless
> so delay this allocation when a limit is set.
> 
> Suggested-by: Michal Hocko <mhocko@kernel.org>
> Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
> ---
<snip>
> @@ -3000,6 +3035,8 @@ static ssize_t mem_cgroup_write(struct kernfs_open_file *of,
>  		}
>  		break;
>  	case RES_SOFT_LIMIT:
> +		if (!soft_limit_initialized)
> +			soft_limit_initialize();

What happens if this fails? Do we disable this interface?
It's a good idea, but I wonder if we can deal with certain
memory cgroups not supporting soft limits due to memory
shortage at the time of using them.

>  		memcg->soft_limit = nr_pages;
>  		ret = 0;
>  		break;

Balbir Singh.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 2/2] mm/cgroup: delay soft limit data allocation Laurent Dufour <ldufour@linux.vnet.ibm.com> - 2017-02-22 17:00 +0100
  Re: [PATCH 2/2] mm/cgroup: delay soft limit data allocation Michal Hocko <mhocko@kernel.org> - 2017-02-22 18:20 +0100
    Re: [PATCH 2/2] mm/cgroup: delay soft limit data allocation Laurent Dufour <ldufour@linux.vnet.ibm.com> - 2017-02-22 19:00 +0100
      Re: [PATCH 2/2] mm/cgroup: delay soft limit data allocation Michal Hocko <mhocko@kernel.org> - 2017-02-22 19:30 +0100
        Re: [PATCH 2/2] mm/cgroup: delay soft limit data allocation Laurent Dufour <ldufour@linux.vnet.ibm.com> - 2017-02-23 10:10 +0100
  Re: [PATCH 2/2] mm/cgroup: delay soft limit data allocation Balbir Singh <bsingharora@gmail.com> - 2017-02-23 02:30 +0100
    Re: [PATCH 2/2] mm/cgroup: delay soft limit data allocation Laurent Dufour <ldufour@linux.vnet.ibm.com> - 2017-02-23 11:50 +0100

csiph-web