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: <20120729205516.GA14801@lizard>
Date:	Sun, 29 Jul 2012 13:55:16 -0700
From:	Anton Vorontsov <cbouatmailru@...il.com>
To:	Tejun Heo <tj@...nel.org>
Cc:	linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org,
	akpm@...ux-foundation.org, padovan@...fusion.mobi,
	marcel@...tmann.org, peterz@...radead.org, mingo@...hat.com,
	davem@...emloft.net, dougthompson@...ssion.com,
	ibm-acpi@....eng.br, rui.zhang@...el.com,
	Jens Axboe <axboe@...nel.dk>, Jiri Kosina <jkosina@...e.cz>,
	David Airlie <airlied@...ux.ie>,
	Roland Dreier <roland@...nel.org>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	"John W. Linville" <linville@...driver.com>,
	Len Brown <len.brown@...el.com>,
	David Howells <dhowells@...hat.com>,
	"J. Bruce Fields" <bfields@...ldses.org>,
	Johannes Berg <johannes@...solutions.net>
Subject: Re: [PATCH 14/15] workqueue: use mod_delayed_work() instead of
 cancel + queue

On Fri, Jul 27, 2012 at 04:55:07PM -0700, Tejun Heo wrote:
> Convert delayed_work users doing [__]cancel_delayed_work() +
> queue_delayed_work() to mod_delayed_work().
> 
> Most conversions are straight-forward.  Ones worth mentioning are,
> 
> * drivers/edac/edac_mc.c: edac_mc_workq_setup() converted to always
>   use mod_delayed_work() and cancel loop in
>   edac_mc_reset_delay_period() is dropped.
> 
> * drivers/platform/x86/thinkpad_acpi.c: No need to remember whether
>   watchdog is active or not.  @fan_watchdog_active and related code
>   dropped.
> 
> * drivers/power/charger-manager.c: Seemingly a lot of
>   delayed_work_pending() abuse going on here.
>   [delayed_]work_pending() are unsynchronized and racy when used like
>   this.  I converted one instance in fullbatt_handler().  Please
>   conver the rest so that it invokes workqueue APIs for the intended
>   target state rather than trying to game work item pending state
>   transitions.  e.g. if timer should be modified - call
>   mod_delayed_work(), canceled - call cancel_delayed_work[_sync]().
> 
> * drivers/thermal/thermal_sys.c: thermal_zone_device_set_polling()
>   simplified.  Note that round_jiffies() calls in this function are
>   meaningless.  round_jiffies() work on absolute jiffies not delta
>   delay used by delayed_work.
> 
> * net/core/link_watch.c: linkwatch_schedule_work() was doing a quite
>   elaborate dancing around its delayed_work.  Collapse it such that
>   linkwatch_work is queued for immediate execution if LW_URGENT and
>   existing timer is kept otherwise.
> 
> Signed-off-by: Tejun Heo <tj@...nel.org>

drivers/power/ bits:

Acked-by: Anton Vorontsov <cbouatmailru@...il.com>

Thanks!

-- 
Anton Vorontsov
Email: cbouatmailru@...il.com
--
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