[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-kernel
Subject:    Re: [PATCH v2 02/07] cpuset use combined atomic_inc_return calls
From:       Michael Buesch <mbuesch () freenet ! de>
Date:       2006-02-09 19:23:51
Message-ID: 200602092023.51547.mbuesch () freenet ! de
[Download RAW message or body]

On Thursday 09 February 2006 19:54, you wrote:
> @@ -1770,8 +1769,7 @@ static long cpuset_create(struct cpuset 
>  	atomic_set(&cs->count, 0);
>  	INIT_LIST_HEAD(&cs->sibling);
>  	INIT_LIST_HEAD(&cs->children);
> -	atomic_inc(&cpuset_mems_generation);
> -	cs->mems_generation = atomic_read(&cpuset_mems_generation);
> +	cs->mems_generation = atomic_inc_return(&cpuset_mems_generation);
>  	fmeter_init(&cs->fmeter);
>  
>  	cs->parent = parent;
> @@ -1861,7 +1859,7 @@ int __init cpuset_init_early(void)
>  	struct task_struct *tsk = current;
>  
>  	tsk->cpuset = &top_cpuset;
> -	tsk->cpuset->mems_generation = atomic_read(&cpuset_mems_generation);
> +	tsk->cpuset->mems_generation = atomic_inc_return(&cpuset_mems_generation);
>  	return 0;
>  }

Is this hunk really correct? I did not look into the code, but from
the patch context it seems like it adds an inc here.

-- 
Greetings Michael.

[Attachment #3 (application/pgp-signature)]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic