* [PATCH 0/8] Remove deprecated workqueue interface users @ 2016-08-13 16:11 Bhaktipriya Shridhar 2016-08-13 16:16 ` [PATCH 1/8] power: abx500_chargalg: Remove deprecated create_singlethread_workqueue Bhaktipriya Shridhar ` (2 more replies) 0 siblings, 3 replies; 6+ messages in thread From: Bhaktipriya Shridhar @ 2016-08-13 16:11 UTC (permalink / raw) To: Sebastian Reichel, Dmitry Eremin-Solenikov, David Woodhouse Cc: linux-pm, linux-kernel, Tejun Heo This patch set removes the instances of deprecated create_singlethread_workqueues in drivers/power by making the appropriate conversions. Bhaktipriya Shridhar (8): power: abx500_chargalg: Remove deprecated create_singlethread_workqueue power: ab8500_btemp: Remove deprecated create_singlethread_workqueue power: pm2301_charger: Remove deprecated create_singlethread_workqueue power: intel_mid_battery: Remove deprecated create_singlethread_workqueue power: ab8500_charger: Remove deprecated create_singlethread_workqueue power: ipaq_micro_battery: Remove deprecated create_singlethread_workqueue power: ab8500_fg: Remove deprecated create_singlethread_workqueue power: ds2760_battery: Remove deprecated create_singlethread_workqueue drivers/power/ab8500_btemp.c | 2 +- drivers/power/ab8500_charger.c | 4 ++-- drivers/power/ab8500_fg.c | 2 +- drivers/power/abx500_chargalg.c | 4 ++-- drivers/power/ds2760_battery.c | 3 ++- drivers/power/intel_mid_battery.c | 3 +-- drivers/power/ipaq_micro_battery.c | 2 +- drivers/power/pm2301_charger.c | 3 ++- 8 files changed, 12 insertions(+), 11 deletions(-) -- 2.1.4 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/8] power: abx500_chargalg: Remove deprecated create_singlethread_workqueue 2016-08-13 16:11 [PATCH 0/8] Remove deprecated workqueue interface users Bhaktipriya Shridhar @ 2016-08-13 16:16 ` Bhaktipriya Shridhar 2016-08-15 22:56 ` [PATCH 0/8] Remove deprecated workqueue interface users Sebastian Reichel 2016-08-15 22:59 ` Tejun Heo 2 siblings, 0 replies; 6+ messages in thread From: Bhaktipriya Shridhar @ 2016-08-13 16:16 UTC (permalink / raw) To: Sebastian Reichel, Dmitry Eremin-Solenikov, David Woodhouse Cc: linux-pm, linux-kernel, Tejun Heo alloc_ordered_workqueue() with WQ_MEM_RECLAIM set replaces deprecated create_singlethread_workqueue(). This is the identity conversion. The workqueue "chargalg_wq" is used for running the charging algorithm. It has multiple workitems viz &di->chargalg_periodic_work, &di->chargalg_wd_work, &di->chargalg_work per abx500_chargalg, which require ordering. It has been identity converted. Also, WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> --- drivers/power/abx500_chargalg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/power/abx500_chargalg.c b/drivers/power/abx500_chargalg.c index d9104b1..a4411d6 100644 --- a/drivers/power/abx500_chargalg.c +++ b/drivers/power/abx500_chargalg.c @@ -2091,8 +2091,8 @@ static int abx500_chargalg_probe(struct platform_device *pdev) abx500_chargalg_maintenance_timer_expired; /* Create a work queue for the chargalg */ - di->chargalg_wq = - create_singlethread_workqueue("abx500_chargalg_wq"); + di->chargalg_wq = alloc_ordered_workqueue("abx500_chargalg_wq", + WQ_MEM_RECLAIM); if (di->chargalg_wq == NULL) { dev_err(di->dev, "failed to create work queue\n"); return -ENOMEM; -- 2.1.4 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/8] Remove deprecated workqueue interface users 2016-08-13 16:11 [PATCH 0/8] Remove deprecated workqueue interface users Bhaktipriya Shridhar 2016-08-13 16:16 ` [PATCH 1/8] power: abx500_chargalg: Remove deprecated create_singlethread_workqueue Bhaktipriya Shridhar @ 2016-08-15 22:56 ` Sebastian Reichel 2016-08-15 22:59 ` Tejun Heo 2 siblings, 0 replies; 6+ messages in thread From: Sebastian Reichel @ 2016-08-15 22:56 UTC (permalink / raw) To: Bhaktipriya Shridhar Cc: Dmitry Eremin-Solenikov, David Woodhouse, linux-pm, linux-kernel, Tejun Heo [-- Attachment #1: Type: text/plain, Size: 290 bytes --] Hi, On Sat, Aug 13, 2016 at 09:41:21PM +0530, Bhaktipriya Shridhar wrote: > This patch set removes the instances of deprecated > create_singlethread_workqueues in drivers/power by making the appropriate > conversions. Thanks, all queued into power-supply's for-next branch. -- Sebastian [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/8] Remove deprecated workqueue interface users 2016-08-13 16:11 [PATCH 0/8] Remove deprecated workqueue interface users Bhaktipriya Shridhar 2016-08-13 16:16 ` [PATCH 1/8] power: abx500_chargalg: Remove deprecated create_singlethread_workqueue Bhaktipriya Shridhar 2016-08-15 22:56 ` [PATCH 0/8] Remove deprecated workqueue interface users Sebastian Reichel @ 2016-08-15 22:59 ` Tejun Heo 2016-08-16 0:23 ` Sebastian Reichel 2 siblings, 1 reply; 6+ messages in thread From: Tejun Heo @ 2016-08-15 22:59 UTC (permalink / raw) To: Bhaktipriya Shridhar Cc: Sebastian Reichel, Dmitry Eremin-Solenikov, David Woodhouse, linux-pm, linux-kernel On Sat, Aug 13, 2016 at 09:41:21PM +0530, Bhaktipriya Shridhar wrote: > This patch set removes the instances of deprecated > create_singlethread_workqueues in drivers/power by making the appropriate > conversions. > > Bhaktipriya Shridhar (8): > power: abx500_chargalg: Remove deprecated create_singlethread_workqueue > power: ab8500_btemp: Remove deprecated create_singlethread_workqueue > power: pm2301_charger: Remove deprecated create_singlethread_workqueue > power: intel_mid_battery: Remove deprecated create_singlethread_workqueue > power: ab8500_charger: Remove deprecated create_singlethread_workqueue > power: ipaq_micro_battery: Remove deprecated create_singlethread_workqueue > power: ab8500_fg: Remove deprecated create_singlethread_workqueue > power: ds2760_battery: Remove deprecated create_singlethread_workqueue Patches look good to me. I'm a bit curious about WQ_MEM_RECLAIM part tho. I suppose the reasoning is that as the hardware in question is involved in battery management which may be time critical, WQ_MEM_RECLAIM is added to ensure (timely) forward progress under memory pressure, right? It'd be great if someone who's more familiar with these hardware can confirm whether this is actually necessary. Oh, it'd also be nice to put the target subsystem in the subject of the patchset - e.g. "[PATCH 0/8] power: Remove..." Thanks. -- tejun ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/8] Remove deprecated workqueue interface users 2016-08-15 22:59 ` Tejun Heo @ 2016-08-16 0:23 ` Sebastian Reichel 2016-08-16 14:51 ` Tejun Heo 0 siblings, 1 reply; 6+ messages in thread From: Sebastian Reichel @ 2016-08-16 0:23 UTC (permalink / raw) To: Tejun Heo Cc: Bhaktipriya Shridhar, Dmitry Eremin-Solenikov, David Woodhouse, linux-pm, linux-kernel [-- Attachment #1: Type: text/plain, Size: 2207 bytes --] Hi, On Mon, Aug 15, 2016 at 06:59:48PM -0400, Tejun Heo wrote: > On Sat, Aug 13, 2016 at 09:41:21PM +0530, Bhaktipriya Shridhar wrote: > > This patch set removes the instances of deprecated > > create_singlethread_workqueues in drivers/power by making the appropriate > > conversions. > > > > Bhaktipriya Shridhar (8): > > power: abx500_chargalg: Remove deprecated create_singlethread_workqueue > > power: ab8500_btemp: Remove deprecated create_singlethread_workqueue > > power: pm2301_charger: Remove deprecated create_singlethread_workqueue > > power: intel_mid_battery: Remove deprecated create_singlethread_workqueue > > power: ab8500_charger: Remove deprecated create_singlethread_workqueue > > power: ipaq_micro_battery: Remove deprecated create_singlethread_workqueue > > power: ab8500_fg: Remove deprecated create_singlethread_workqueue > > power: ds2760_battery: Remove deprecated create_singlethread_workqueue > > Patches look good to me. I'm a bit curious about WQ_MEM_RECLAIM > part tho. I suppose the reasoning is that as the hardware in > question is involved in battery management which may be time > critical, WQ_MEM_RECLAIM is added to ensure (timely) forward > progress under memory pressure, right? It'd be great if someone > who's more familiar with these hardware can confirm whether this > is actually necessary. At least the charger monitoring is timing critical: Many charger chips must be monitored (e.g. for over-temp. events). I think all of them have a self-protection, or a watchdog, so they would actually stop charging instead of overheating, but that may result in system failure due to power loss. Battery monitors also include some temperture safety checks. So without careful case-by-case checking the WQ_MEM_RECLAIM should not be removed IMHO. Anyways, I queued this patchset, since create_singlethread_workqueue() did use WQ_MEM_RECLAIM, so removing that bit should be in another patch. > Oh, it'd also be nice to put the target subsystem in the subject of > the patchset - e.g. "[PATCH 0/8] power: Remove..." Yes please. Also it seems like PATCH2-8 have wrong reference to PATCH0/8 mail. -- Sebastian [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/8] Remove deprecated workqueue interface users 2016-08-16 0:23 ` Sebastian Reichel @ 2016-08-16 14:51 ` Tejun Heo 0 siblings, 0 replies; 6+ messages in thread From: Tejun Heo @ 2016-08-16 14:51 UTC (permalink / raw) To: Sebastian Reichel Cc: Bhaktipriya Shridhar, Dmitry Eremin-Solenikov, David Woodhouse, linux-pm, linux-kernel Hello, Sebastian. On Tue, Aug 16, 2016 at 02:23:21AM +0200, Sebastian Reichel wrote: > At least the charger monitoring is timing critical: Many charger > chips must be monitored (e.g. for over-temp. events). I think > all of them have a self-protection, or a watchdog, so they would > actually stop charging instead of overheating, but that may result > in system failure due to power loss. Battery monitors also include > some temperture safety checks. So without careful case-by-case > checking the WQ_MEM_RECLAIM should not be removed IMHO. Thanks for the clarification. Yeah, WQ_MEM_RECLAIM seems like the right call. Thanks. -- tejun ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-08-16 14:51 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-08-13 16:11 [PATCH 0/8] Remove deprecated workqueue interface users Bhaktipriya Shridhar 2016-08-13 16:16 ` [PATCH 1/8] power: abx500_chargalg: Remove deprecated create_singlethread_workqueue Bhaktipriya Shridhar 2016-08-15 22:56 ` [PATCH 0/8] Remove deprecated workqueue interface users Sebastian Reichel 2016-08-15 22:59 ` Tejun Heo 2016-08-16 0:23 ` Sebastian Reichel 2016-08-16 14:51 ` Tejun Heo
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).