Lines Matching refs:grp

2937 static inline int get_numa_group(struct numa_group *grp)  in get_numa_group()  argument
2939 return refcount_inc_not_zero(&grp->refcount); in get_numa_group()
2942 static inline void put_numa_group(struct numa_group *grp) in put_numa_group() argument
2944 if (refcount_dec_and_test(&grp->refcount)) in put_numa_group()
2945 kfree_rcu(grp, rcu); in put_numa_group()
2951 struct numa_group *grp, *my_grp; in task_numa_group() local
2962 grp = kzalloc(size, GFP_KERNEL | __GFP_NOWARN); in task_numa_group()
2963 if (!grp) in task_numa_group()
2966 refcount_set(&grp->refcount, 1); in task_numa_group()
2967 grp->active_nodes = 1; in task_numa_group()
2968 grp->max_faults_cpu = 0; in task_numa_group()
2969 spin_lock_init(&grp->lock); in task_numa_group()
2970 grp->gid = p->pid; in task_numa_group()
2973 grp->faults[i] = p->numa_faults[i]; in task_numa_group()
2975 grp->total_faults = p->total_numa_faults; in task_numa_group()
2977 grp->nr_tasks++; in task_numa_group()
2978 rcu_assign_pointer(p->numa_group, grp); in task_numa_group()
2987 grp = rcu_dereference(tsk->numa_group); in task_numa_group()
2988 if (!grp) in task_numa_group()
2992 if (grp == my_grp) in task_numa_group()
2999 if (my_grp->nr_tasks > grp->nr_tasks) in task_numa_group()
3005 if (my_grp->nr_tasks == grp->nr_tasks && my_grp > grp) in task_numa_group()
3019 if (join && !get_numa_group(grp)) in task_numa_group()
3028 double_lock_irq(&my_grp->lock, &grp->lock); in task_numa_group()
3032 grp->faults[i] += p->numa_faults[i]; in task_numa_group()
3035 grp->total_faults += p->total_numa_faults; in task_numa_group()
3038 grp->nr_tasks++; in task_numa_group()
3041 spin_unlock_irq(&grp->lock); in task_numa_group()
3043 rcu_assign_pointer(p->numa_group, grp); in task_numa_group()
3063 struct numa_group *grp = rcu_dereference_raw(p->numa_group); in task_numa_free() local
3071 if (grp) { in task_numa_free()
3072 spin_lock_irqsave(&grp->lock, flags); in task_numa_free()
3074 grp->faults[i] -= p->numa_faults[i]; in task_numa_free()
3075 grp->total_faults -= p->total_numa_faults; in task_numa_free()
3077 grp->nr_tasks--; in task_numa_free()
3078 spin_unlock_irqrestore(&grp->lock, flags); in task_numa_free()
3080 put_numa_group(grp); in task_numa_free()