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-next>] [day] [month] [year] [list]
Message-Id: <1308954457-21487-1-git-send-email-padovan@profusion.mobi>
Date:	Fri, 24 Jun 2011 19:27:36 -0300
From:	"Gustavo F. Padovan" <padovan@...fusion.mobi>
To:	tj@...nel.org
Cc:	linux-kernel@...r.kernel.org, padovan@...fusion.mobi,
	marcel@...tmann.org, a.p.zijlstra@...llo.nl,
	akpm@...ux-foundation.org
Subject: [RFC] Add mod_delayed_work()

Hi,

In the work to move Bluetooth RX processing to workqueues I faced some
issues when trying to move our timers to workqueue, including deadlocks.
We use mod_timer() a lot to reset timer's delay, but the alternative with
workqueues is

	cancel_delayed_work_sync(work);
	queue_delayed_work(wq, work, delay);

This is too much for a simple change in the delay, so I did some research on
this and found that other pieces[0] in the kernel may have the same needs and
cooked a patch to create mod_delayed_work(). I used this name because we
basically call mod_timer there (or queue the work if it is not pending).

Then I propose replace the two lines above with:
	mod_delayed_work(wq, work, delay);

Please comment.

	Gustavo

[0] https://lkml.org/lkml/2011/2/3/175	

Gustavo F. Padovan (1):
  workqueue: Add mod_delayed_work()

 include/linux/workqueue.h |    2 ++
 kernel/workqueue.c        |   26 ++++++++++++++++++++++++++
 2 files changed, 28 insertions(+), 0 deletions(-)

-- 
1.7.5.1

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