Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\workqueue.c Create Date:2022-07-28 09:26:57
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:lush_workqueue - ensure that any scheduled work has run to completion.*@wq: workqueue to flush* This function sleeps until all work items which were queued on entry* have finished execution, but it is not livelocked by new incoming ones.

Proto:void flush_workqueue(struct workqueue_struct *wq)

Type:void

Parameter:

TypeParameterName
struct workqueue_struct *wq
2765  struct wq_flusher this_flusher = {WQ: list of flushers = Simple doubly linked list implementation(list), WQ: flush color waiting for = - 1, lush completion = COMPLETION_INITIALIZER_ONSTACK_MAP(done, lockdep_map), }
2772  If WARN_ON(!can kworkers be created yet? ) Then Return
2775  lock_map_acquire( & lockdep_map)
2776  lock_map_release( & lockdep_map)
2778  mutex_lock( & protects this wq )
2783  next_color = work_next_color(WQ: current work color )
2785  If next_color != WQ: current flush color Then
2791  WARN_ON_ONCE(!list_empty - tests whether a list is empty*@head: the list to test.)
2792  WQ: flush color waiting for = WQ: current work color
2793  WQ: current work color = next_color
2795  If Not WQ: first flusher Then
2808  Else
2814  Else
2820  list_add_tail - add a new entry*@new: new entry to be added*@head: list head to add it before* Insert a new entry before the specified head.* This is useful for implementing queues.
2823  heck_flush_dependency - check for flush dependency sanity*@target_wq: workqueue being flushed*@target_work: work item being flushed (NULL for workqueue flushes)* %current is trying to flush the whole @target_wq or @target_work on it
2825  mutex_unlock( & protects this wq )
2827  wait_for_completion( & lush completion )
2835  If WQ: first flusher != this_flusher Then Return
2838  mutex_lock( & protects this wq )
2841  If WQ: first flusher != this_flusher Then Go to out_unlock
2844  WQ: first flusher = NULL
2846  WARN_ON_ONCE(!list_empty - tests whether a list is empty*@head: the list to test.)
2847  WARN_ON_ONCE(WQ: current flush color != WQ: flush color waiting for )
2849  When (true) cycle
2854  If WQ: flush color waiting for != WQ: current flush color Then Break
2856  list_del_init - deletes entry from list and reinitialize it.*@entry: the element to delete from the list.
2857  complete( & lush completion )
2860  WARN_ON_ONCE(!list_empty - tests whether a list is empty*@head: the list to test. && WQ: current flush color != work_next_color(WQ: current work color ))
2864  WQ: current flush color = work_next_color(WQ: current flush color )
2867  If Not list_empty - tests whether a list is empty*@head: the list to test. Then
2874  list_for_each_entry - iterate over list of given type*@pos: the type * to use as a loop cursor.*@head: the head for your list.*@member: the name of the list_head within the struct.(tmp, & WQ: flush overflow list , list)
2875  WQ: flush color waiting for = WQ: current work color
2877  WQ: current work color = work_next_color(WQ: current work color )
2879  list_splice_tail_init - join two lists and reinitialise the emptied list*@list: the new list to add.*@head: the place to add it in the first list.* Each of the lists is a queue.* The list at @list is reinitialised
2881  lush_workqueue_prep_pwqs - prepare pwqs for workqueue flushing*@wq: workqueue being flushed*@flush_color: new flush color, < 0 for no-op*@work_color: new work color, < 0 for no-op* Prepare pwqs for workqueue flushing
2884  If list_empty - tests whether a list is empty*@head: the list to test. Then
2885  WARN_ON_ONCE(WQ: current flush color != WQ: current work color )
2886  Break
2893  WARN_ON_ONCE(WQ: current flush color == WQ: current work color )
2894  WARN_ON_ONCE(WQ: current flush color != WQ: flush color waiting for )
2896  list_del_init - deletes entry from list and reinitialize it.*@entry: the element to delete from the list.
2897  WQ: first flusher = next
2899  If lush_workqueue_prep_pwqs - prepare pwqs for workqueue flushing*@wq: workqueue being flushed*@flush_color: new flush color, < 0 for no-op*@work_color: new work color, < 0 for no-op* Prepare pwqs for workqueue flushing Then Break
2906  WQ: first flusher = NULL
2909  out_unlock :
2910  mutex_unlock( & protects this wq )
Caller
NameDescribe
drain_workqueuedrain_workqueue - drain a workqueue*@wq: workqueue to drain* Wait until the workqueue becomes empty. While draining is in progress,* only chain queueing is allowed. IOW, only currently pending or running
__test_cycle
stress
cgroup1_pidlist_destroy_allUsed to destroy all pidlists lingering waiting for destroy timer. None* should be left afterwards.
cpuset_post_attach
cpuset_write_resmaskCommon handling for a write to a "cpus" or "mems" file.
flush_scheduled_worklush_scheduled_work - ensure that any scheduled work has run to completion.* Forces execution of the kernel-global workqueue and blocks until its* completion.* Think twice before calling this function! It's very easy to get into