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]
Message-ID: <20121222022210.GA30177@htj.dyndns.org>
Date:	Fri, 21 Dec 2012 18:22:10 -0800
From:	Tejun Heo <tj@...nel.org>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 25/25] ipc: don't use [delayed_]work_pending()

Hello, Andrew.

On Fri, Dec 21, 2012 at 06:15:23PM -0800, Andrew Morton wrote:
> On Fri, 21 Dec 2012 17:57:15 -0800 Tejun Heo <tj@...nel.org> wrote:
> 
> > There's no need to test whether a (delayed) work item in pending
> > before queueing, flushing or cancelling it.  Most uses are unnecessary
> > and quite a few of them are buggy.
> 
> > -		if (!work_pending(&ipc_memory_wq))
> > -			schedule_work(&ipc_memory_wq);
> > +		schedule_work(&ipc_memory_wq);
> 
> Well, the new code is a ton slower than the old code if the work is
> frequently pending, so some care is needed with such a conversion.

Yeah, I mentioned it in the head message.  it comes down to
test_and_set_bit() vs. test_bit() and none of the current users seems
to be hot enough for that to matter at all.

In very hot paths, such optimization *could* be valid.  The problem is
that [delayed_]work_pending() seem to be abused much more than they
are put to any actual usefulness.  Maybe we should rename them to
something really ugly.  I don't know.

> That's not an issue for the IPC callsite - memory offlining isn't
> frequent.
> 
> > ...
> >
> > Please let me know how this patch should be routed.  I can take it
> > through the workqueue tree if necessary.
> > 
> 
> Please merge this one yourself.

Can I add your acked-by?

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