cregit-Linux how code gets into the kernel

Release 4.15 kernel/sched/autogroup.h

Directory: kernel/sched
/* SPDX-License-Identifier: GPL-2.0 */
#ifdef CONFIG_SCHED_AUTOGROUP

#include <linux/kref.h>
#include <linux/rwsem.h>
#include <linux/sched/autogroup.h>


struct autogroup {
	/*
         * reference doesn't mean how many thread attach to this
         * autogroup now. It just stands for the number of task
         * could use this autogroup.
         */
	
struct kref		kref;
	
struct task_group	*tg;
	
struct rw_semaphore	lock;
	
unsigned long		id;
	
int			nice;
};

extern void autogroup_init(struct task_struct *init_task);
extern void autogroup_free(struct task_group *tg);


static inline bool task_group_is_autogroup(struct task_group *tg) { return !!tg->autogroup; }

Contributors

PersonTokensPropCommitsCommitProp
Peter Zijlstra947.37%133.33%
Yong Zhang842.11%133.33%
Mike Galbraith210.53%133.33%
Total19100.00%3100.00%

extern bool task_wants_autogroup(struct task_struct *p, struct task_group *tg);
static inline struct task_group * autogroup_task_group(struct task_struct *p, struct task_group *tg) { int enabled = READ_ONCE(sysctl_sched_autogroup_enabled); if (enabled && task_wants_autogroup(p, tg)) return p->signal->autogroup->tg; return tg; }

Contributors

PersonTokensPropCommitsCommitProp
Peter Zijlstra2346.00%120.00%
Mike Galbraith1530.00%120.00%
Ingo Molnar918.00%120.00%
Yong Zhang24.00%120.00%
Jason Low12.00%120.00%
Total50100.00%5100.00%

extern int autogroup_path(struct task_group *tg, char *buf, int buflen); #else /* !CONFIG_SCHED_AUTOGROUP */
static inline void autogroup_init(struct task_struct *init_task) { }

Contributors

PersonTokensPropCommitsCommitProp
Mike Galbraith11100.00%1100.00%
Total11100.00%1100.00%


static inline void autogroup_free(struct task_group *tg) { }

Contributors

PersonTokensPropCommitsCommitProp
Mike Galbraith11100.00%1100.00%
Total11100.00%1100.00%


static inline bool task_group_is_autogroup(struct task_group *tg) { return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Mike Galbraith15100.00%1100.00%
Total15100.00%1100.00%


static inline struct task_group * autogroup_task_group(struct task_struct *p, struct task_group *tg) { return tg; }

Contributors

PersonTokensPropCommitsCommitProp
Mike Galbraith22100.00%1100.00%
Total22100.00%1100.00%

#ifdef CONFIG_SCHED_DEBUG
static inline int autogroup_path(struct task_group *tg, char *buf, int buflen) { return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Mike Galbraith22100.00%1100.00%
Total22100.00%1100.00%

#endif #endif /* CONFIG_SCHED_AUTOGROUP */

Overall Contributors

PersonTokensPropCommitsCommitProp
Mike Galbraith13854.76%225.00%
Peter Zijlstra8834.92%112.50%
Ingo Molnar135.16%225.00%
Yong Zhang114.37%112.50%
Jason Low10.40%112.50%
Greg Kroah-Hartman10.40%112.50%
Total252100.00%8100.00%
Directory: kernel/sched
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.