[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130105221115.GC1246@lizard.mcd00620.sjc.wayport.net>
Date: Sat, 5 Jan 2013 14:11:15 -0800
From: Anton Vorontsov <anton.vorontsov@...aro.org>
To: Tejun Heo <tj@...nel.org>
Cc: linux-kernel@...r.kernel.org,
David Woodhouse <dwmw2@...radead.org>,
Donggeun Kim <dg77.kim@...sung.com>,
MyungJoo Ham <myungjoo.ham@...sung.com>
Subject: Re: [PATCH 01/25] charger_manager: don't use [delayed_]work_pending()
On Fri, Dec 21, 2012 at 05:56:51PM -0800, Tejun Heo 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.
>
> Remove unnecessary pending tests and rewrite _setup_polling() so that
> it uses mod_delayed_work() if the next polling interval is sooner than
> currently scheduled. queue_delayed_work() is used otherwise.
>
> Only compile tested. I noticed that two work items - setup_polling
> and cm_monitor_work - schedule each other. It's a very unusual
> construct and I'm fairly sure it's racy. You can't break such
> circular dependency by calling cancel on each. I strongly recommend
> revising the mechanism.
>
> Signed-off-by: Tejun Heo <tj@...nel.org>
> Cc: Anton Vorontsov <cbou@...l.ru>
> Cc: David Woodhouse <dwmw2@...radead.org>
> Cc: Donggeun Kim <dg77.kim@...sung.com>
> Cc: MyungJoo Ham <myungjoo.ham@...sung.com>
> ---
> Please let me know how this patch should be routed. I can take it
> through the workqueue tree if necessary.
Charger manager is a fast moving target, so it is prone to conflict; it is
better if I take it via battery-2.6.git tree. It is merged, thanks a lot!
Anton
--
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