[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <513671CF.5050705@gmail.com>
Date: Wed, 06 Mar 2013 09:29:35 +1100
From: Ryan Mallon <rmallon@...il.com>
To: Tejun Heo <tj@...nel.org>
CC: linux-kernel@...r.kernel.org, laijs@...fujitsu.com,
axboe@...nel.dk, jmoyer@...hat.com, zab@...hat.com,
kbuild test robot <fengguang.wu@...el.com>
Subject: Re: [PATCH v2 16/31] workqueue: introduce workqueue_attrs
On 05/03/13 05:37, Tejun Heo wrote:
> Introduce struct workqueue_attrs which carries worker attributes -
> currently the nice level and allowed cpumask along with helper
> routines alloc_workqueue_attrs() and free_workqueue_attrs().
>
> Each worker_pool now carries ->attrs describing the attributes of its
> workers. All functions dealing with cpumask and nice level of workers
> are updated to follow worker_pool->attrs instead of determining them
> from other characteristics of the worker_pool, and init_workqueues()
> is updated to set worker_pool->attrs appropriately for all standard
> pools.
>
> Note that create_worker() is updated to always perform set_user_nice()
> and use set_cpus_allowed_ptr() combined with manual assertion of
> PF_THREAD_BOUND instead of kthread_bind(). This simplifies handling
> random attributes without affecting the outcome.
>
> This patch doesn't introduce any behavior changes.
>
> v2: Missing cpumask_var_t definition caused build failure on some
> archs. linux/cpumask.h included.
>
> Signed-off-by: Tejun Heo <tj@...nel.org>
> Reported-by: kbuild test robot <fengguang.wu@...el.com>
> --- a/kernel/workqueue.c
> +++ b/kernel/workqueue.c
> @@ -148,6 +148,8 @@ struct worker_pool {
> struct mutex assoc_mutex; /* protect POOL_DISASSOCIATED */
> struct ida worker_ida; /* L: for worker IDs */
>
> + struct workqueue_attrs *attrs; /* I: worker attributes */
If attrs always exists, why not just embed the struct and avoid the
need to alloc/free it?
~Ryan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists