lkml.org 
[lkml]   [2013]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 16/31] workqueue: introduce workqueue_attrs
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.

--
tejun


\
 
 \ /
  Last update: 2013-03-06 00:21    [W:0.069 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site