Re: [PATCH] cgroup: remove extra calls to find_existing_css_set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello, Manddep.

On Tue, Jan 24, 2012 at 10:26:31AM -0800, Mandeep Singh Baines wrote:
> In cgroup_attach_proc, we indirectly call find_existing_css_set 3
> times. It is an expensive call so we want to call it a minimum
> of times. This patch only calls it once and stores the result so
> that it can be used later on when we call cgroup_task_migrate.
> 
> This required modifying cgroup_task_migrate to take the new css_set
> (which we obtained from find_css_set) as a parameter. The nice side
> effect of this is that cgroup_task_migrate is now identical for
> cgroup_attach_task and cgroup_attach_proc. It also now returns a
> void since it can never fail.
> 
> Changes in V5:
> * https://lkml.org/lkml/2012/1/20/344 (Tejun Heo)
>   * Remove css_set_refs
             ^^^^^^^^^^^^
>  static int cgroup_attach_proc(struct cgroup *cgrp, struct task_struct *leader)
>  {
> -	int retval, i, group_size;
> +	int retval, i, group_size, css_set_refs = 0;
				   ^^^^^^^^^^^^
Wrong patch?

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe cgroups" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [Monitors]

  Powered by Linux