Re: [Patch 4/4] sched: Improve fairness of cpu bandwidth allocation for task groups

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

 



* Srivatsa Vaddagiri <[email protected]> wrote:

> +static inline void lock_doms_cur(void)
> +{
> +	mutex_lock(&doms_cur_mutex);
> +}
> +
> +static inline void unlock_doms_cur(void)
> +{
> +	mutex_unlock(&doms_cur_mutex);
> +}
> +
>  #else
>  
>  static inline void set_task_cfs_rq(struct task_struct *p, unsigned int cpu) { }
>  static inline void lock_task_group_list(void) { }
>  static inline void unlock_task_group_list(void) { }
> +static inline void lock_doms_cur(void) { }
> +static inline void unlock_doms_cur(void) { }
>  
>  #endif	/* CONFIG_FAIR_GROUP_SCHED */
>  
> @@ -6546,6 +6605,8 @@
>  {
>  	int i, j;
>  
> +	lock_doms_cur();
> +
>  	/* always unregister in case we don't destroy any domains */
>  	unregister_sched_domain_sysctl();
>  
> @@ -6586,6 +6647,8 @@
>  	ndoms_cur = ndoms_new;
>  
>  	register_sched_domain_sysctl();
> +
> +	unlock_doms_cur();
>  }

this API and locking should be introduced in a separate patch first, to 
reduce the size and impact of the 4/4 patch.

	Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux