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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 22 Jan 2013 17:09:58 -0800
From:	Tejun Heo <tj@...nel.org>
To:	Joonsoo Kim <iamjoonsoo.kim@....com>
Cc:	linux-kernel@...r.kernel.org, Lai Jiangshan <laijs@...fujitsu.com>
Subject: Re: [PATCH 15/17] workqueue: remove global_cwq

On Tue, Jan 22, 2013 at 03:50:39PM +0900, Joonsoo Kim wrote:
> > -static DEFINE_PER_CPU(struct global_cwq, global_cwq);
> > +static DEFINE_PER_CPU_ALIGNED(struct worker_pool [NR_STD_WORKER_POOLS],
> > +			      cpu_std_worker_pools);
> >  static DEFINE_PER_CPU_SHARED_ALIGNED(atomic_t, pool_nr_running[NR_STD_WORKER_POOLS]);
> 
> Why worker_pool is defined as DEFINE_PER_CPU_ALIGNED?
> 
> And this makes only worker_pool[0] aligned with cacheline.
> worker_pool[1] is not aligned with cacheline.
> Now, we have a spin_lock for each instance of worker_pool and
> each one is independent instance.
> So, IMHO, it is better to align worker_pool[1] with cacheline.

Right, it's just carried over from the time when there was single pool
implemented as global_gcwq.  We probably should define struct
worker_pool as cache aligned.

Thanks.

-- 
tejun
--
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