alloc_ordered_workqueue() with WQ_MEM_RECLAIM set, replaces
deprecated create_singlethread_workqueue(). This is the identity
conversion. The workqueue "ts_workq" has been identity converted.
It queues work items viz &wm->ts_reader and &wm->pen_event_work which map
to wm97xx_pen_irq_worker (handles a pen down interrupt) and
wm97xx_ts_reader (the touchscreen sample reader) respectively. Hence,
an ordered dedicated workqueue has been used.
WQ_MEM_RECLAIM has been set to ensure forward progress under memory
pressure.
Signed-off-by: Bhaktipriya Shridhar <redacted>
---
drivers/input/touchscreen/wm97xx-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
The workqueue "workqueue" has a single workitem(&priv->work) and hence
doesn't require ordering. Also, it is not being used on a memory reclaim
path. Hence, the singlethreaded workqueue has been replaced with the use
of system_wq.
System workqueues have been able to handle high level of concurrency
for a long time now and hence it's not required to have a singlethreaded
workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue
created with create_singlethread_workqueue(), system_wq allows multiple
work items to overlap executions even on the same CPU; however, a
per-cpu workqueue doesn't have any CPU locality or global ordering
guarantee unless the target CPU is explicitly specified and thus the
increase of local concurrency shouldn't make any difference.
Workitem is sync cancelled in mc13783_ts_remove() to ensure that there
are no workitems pending when the driver is disconnected.
Signed-off-by: Bhaktipriya Shridhar <redacted>
---
drivers/input/touchscreen/mc13783_ts.c | 19 ++++---------------
1 file changed, 4 insertions(+), 15 deletions(-)
alloc_ordered_workqueue replaces the deprecated
create_singlethread_workqueue.
There are multiple work items on the work queue viz
&priv->dev3_register_work, &priv->recalib_wq, &psmouse->resync_work,
which require execution ordering. Hence, an ordered workqueue has been
used.
The workqueue is not being used on a memory reclaim path.
Hence, WQ_MEM_RECLAIM has not been set.
Signed-off-by: Bhaktipriya Shridhar <redacted>
---
drivers/input/mouse/psmouse-base.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Charles Keepax <hidden> Date: 2016-08-15 08:56:39
On Sun, Aug 14, 2016 at 10:56:38AM +0530, Bhaktipriya Shridhar wrote:
alloc_ordered_workqueue() with WQ_MEM_RECLAIM set, replaces
deprecated create_singlethread_workqueue(). This is the identity
conversion. The workqueue "ts_workq" has been identity converted.
It queues work items viz &wm->ts_reader and &wm->pen_event_work which map
to wm97xx_pen_irq_worker (handles a pen down interrupt) and
wm97xx_ts_reader (the touchscreen sample reader) respectively. Hence,
an ordered dedicated workqueue has been used.
WQ_MEM_RECLAIM has been set to ensure forward progress under memory
pressure.
Signed-off-by: Bhaktipriya Shridhar <redacted>
---
Acked-by: Charles Keepax <redacted>
Thanks,
Charles
On Sun, Aug 14, 2016 at 10:56:38AM +0530, Bhaktipriya Shridhar wrote:
alloc_ordered_workqueue() with WQ_MEM_RECLAIM set, replaces
deprecated create_singlethread_workqueue(). This is the identity
conversion. The workqueue "ts_workq" has been identity converted.
It queues work items viz &wm->ts_reader and &wm->pen_event_work which map
to wm97xx_pen_irq_worker (handles a pen down interrupt) and
wm97xx_ts_reader (the touchscreen sample reader) respectively. Hence,
an ordered dedicated workqueue has been used.
WQ_MEM_RECLAIM has been set to ensure forward progress under memory
pressure.
I'm not sure WQ_MEM_RECLAIM makes sense on an input driver.
Thanks.
--
tejun
On Sun, Aug 14, 2016 at 10:53:07AM +0530, Bhaktipriya Shridhar wrote:
alloc_ordered_workqueue replaces the deprecated
create_singlethread_workqueue.
There are multiple work items on the work queue viz
&priv->dev3_register_work, &priv->recalib_wq, &psmouse->resync_work,
which require execution ordering. Hence, an ordered workqueue has been
used.
The workqueue is not being used on a memory reclaim path.
Hence, WQ_MEM_RECLAIM has not been set.
Signed-off-by: Bhaktipriya Shridhar <redacted>
On Sun, Aug 14, 2016 at 10:55:30AM +0530, Bhaktipriya Shridhar wrote:
The workqueue "workqueue" has a single workitem(&priv->work) and hence
doesn't require ordering. Also, it is not being used on a memory reclaim
path. Hence, the singlethreaded workqueue has been replaced with the use
of system_wq.
System workqueues have been able to handle high level of concurrency
for a long time now and hence it's not required to have a singlethreaded
workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue
created with create_singlethread_workqueue(), system_wq allows multiple
work items to overlap executions even on the same CPU; however, a
per-cpu workqueue doesn't have any CPU locality or global ordering
guarantee unless the target CPU is explicitly specified and thus the
increase of local concurrency shouldn't make any difference.
Workitem is sync cancelled in mc13783_ts_remove() to ensure that there
are no workitems pending when the driver is disconnected.
Signed-off-by: Bhaktipriya Shridhar <redacted>
On Sun, Aug 14, 2016 at 10:55:30AM +0530, Bhaktipriya Shridhar wrote:
The workqueue "workqueue" has a single workitem(&priv->work) and hence
doesn't require ordering. Also, it is not being used on a memory reclaim
path. Hence, the singlethreaded workqueue has been replaced with the use
of system_wq.
System workqueues have been able to handle high level of concurrency
for a long time now and hence it's not required to have a singlethreaded
workqueue just to gain concurrency. Unlike a dedicated per-cpu workqueue
created with create_singlethread_workqueue(), system_wq allows multiple
work items to overlap executions even on the same CPU; however, a
per-cpu workqueue doesn't have any CPU locality or global ordering
guarantee unless the target CPU is explicitly specified and thus the
increase of local concurrency shouldn't make any difference.
Workitem is sync cancelled in mc13783_ts_remove() to ensure that there
are no workitems pending when the driver is disconnected.
Signed-off-by: Bhaktipriya Shridhar <redacted>
On Sun, Aug 14, 2016 at 10:56:38AM +0530, Bhaktipriya Shridhar wrote:
alloc_ordered_workqueue() with WQ_MEM_RECLAIM set, replaces
deprecated create_singlethread_workqueue(). This is the identity
conversion. The workqueue "ts_workq" has been identity converted.
It queues work items viz &wm->ts_reader and &wm->pen_event_work which map
to wm97xx_pen_irq_worker (handles a pen down interrupt) and
wm97xx_ts_reader (the touchscreen sample reader) respectively. Hence,
an ordered dedicated workqueue has been used.
WQ_MEM_RECLAIM has been set to ensure forward progress under memory
pressure.
Signed-off-by: Bhaktipriya Shridhar <redacted>
On Tue, Aug 23, 2016 at 02:01:33PM -0700, Dmitry Torokhov wrote:
On Sun, Aug 14, 2016 at 10:56:38AM +0530, Bhaktipriya Shridhar wrote:
quoted
alloc_ordered_workqueue() with WQ_MEM_RECLAIM set, replaces
deprecated create_singlethread_workqueue(). This is the identity
conversion. The workqueue "ts_workq" has been identity converted.
It queues work items viz &wm->ts_reader and &wm->pen_event_work which map
to wm97xx_pen_irq_worker (handles a pen down interrupt) and
wm97xx_ts_reader (the touchscreen sample reader) respectively. Hence,
an ordered dedicated workqueue has been used.
WQ_MEM_RECLAIM has been set to ensure forward progress under memory
pressure.
Signed-off-by: Bhaktipriya Shridhar <redacted>
On Mon, Aug 15, 2016 at 06:53:45PM -0400, Tejun Heo wrote:
On Sun, Aug 14, 2016 at 10:53:07AM +0530, Bhaktipriya Shridhar wrote:
quoted
alloc_ordered_workqueue replaces the deprecated
create_singlethread_workqueue.
There are multiple work items on the work queue viz
&priv->dev3_register_work, &priv->recalib_wq, &psmouse->resync_work,
which require execution ordering. Hence, an ordered workqueue has been
used.
The workqueue is not being used on a memory reclaim path.
Hence, WQ_MEM_RECLAIM has not been set.
Signed-off-by: Bhaktipriya Shridhar <redacted>