lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 06 Mar 2013 09:40:48 +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 06/03/13 09:34, Tejun Heo wrote:
> On Tue, Mar 05, 2013 at 02:33:27PM -0800, Tejun Heo wrote:
>> Hello, Ryan.
>>
>> On Wed, Mar 06, 2013 at 09:29:35AM +1100, Ryan Mallon wrote:
>>>> @@ -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?
>>
>> Because then it'll need a separate init paths for embedded ones.  If
>> the field was in any way hot, I'd have embedded it but it isn't and
>> it's just less code to share the alloc path.
> 
> Ooh, right, and that cpumask_t is going away and you can't statically
> allocate cpumask_var_t, so it needs an allocation and error check from
> it anyway.

Not sure I follow. I mean drop the pointer, eg:

	struct workqueue_attr attrs;

Since, at least in this patch, struct worker_pool appears to always
alloc the attrs field. You do still of course need the cpumask_t
initialisation. Am I missing something?

~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

Powered by Openwall GNU/*/Linux Powered by OpenVZ