alloc_ordered_workqueue()

Another snippet from my patch.

/drivers/net/caif/caif_hsi.c

–        cfhsi->wq = create_singlethread_workqueue(cfhsi->ndev->name);

+       cfhsi->wq = alloc_ordered_workqueue(cfhsi->ndev->name, WQ_MEM_RECLAIM);

An ordered workqueue has been used since workitems &cfhsi->wake_up_work

and &cfhsi->wake_down_work cannot be run concurrently.

Since the work items are being used on a packet tx/rx path, WQ_MEM_RECLAIM has been set to guarantee forward progress under memory pressure.

Tip..

Used when the queued work items require strict execution ordering…

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s