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] [day] [month] [year] [list]
Message-ID: <20130213222358.GD9057@htj.dyndns.org>
Date:	Wed, 13 Feb 2013 14:23:58 -0800
From:	Tejun Heo <tj@...nel.org>
To:	Lai Jiangshan <laijs@...fujitsu.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 13/13] workqueue: record global worker ID instead of pool
 ID in work->data when off-queue

Hello, again.

On Thu, Feb 07, 2013 at 02:02:27PM -0800, Tejun Heo wrote:
> I do like work items pointing back to workers instead of pools, so I
> think I'll try that differently.

I tried to convert work->data to point to the last worker and having
tried it I'm not too sure about it anymore.

* work->data points to cwq while queued which basically is the current
  pool + target workqueue.  Making work->data point to worker off
  queue makes the two modes further apart, which is a bit
  uncomfortable.

* Also, as it currently stands, we can't remove busy_hash because
  on-queue work->data can't point to the last worker and thus we need
  to look up busy_hash before actually executing it.  If we're gonna
  have to keep busy_hash, we might as well use it consistently.

* With pending idr changes, idr lookups become very efficient if the
  ID range is limited.  The range currently is 256 which should be
  enough to cover all the pools in most configurations.  The idr
  lookup essentially becomes if (prefix matches) return hint[offset],
  so I don't think it would save anything measureable from removing
  that look up.  Replacing the idr + busy_hash lookup with single idr
  last worker lookup could still be nicer, I think, but probably not
  by too much.

So, I'm not really seeing too much benefit in converting work->data to
point to the last worker.  If we can remove busy_hash, maybe, but
short of that, I think I'm gonna keep things the way they're now.

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