Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:start_flush_work

Proto:static bool start_flush_work(struct work_struct *work, struct wq_barrier *barr, bool from_cancel)

Type:bool

Parameter:

TypeParameterName
struct work_struct *work
struct wq_barrier *barr
boolfrom_cancel
2972  struct worker * worker = NULL
2976  might_sleep()
2978  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
2979  pool = get_work_pool - return the worker_pool a given work was associated with*@work: the work item of interest* Pools are created and destroyed under wq_pool_mutex, and allows read* access under RCU read lock. As such, this function should be
2980  If Not pool Then
2981  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
2982  Return false
2985  spin_lock_irq( & he pool lock )
2987  pwq = get_work_pwq(work)
2988  If pwq Then
2989  If Value for the false possibility is greater at compile time(I: the associated pool != pool) Then Go to already_gone
2991  Else
2992  worker = d_worker_executing_work - find worker which is executing a work*@pool: pool of interest*@work: work to find worker for* Find a worker which is executing @work on @pool by searching*@pool->busy_hash which is keyed by the address of @work
2993  If Not worker Then Go to already_gone
2995  pwq = L: current_work's pwq
2998  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
3000  sert_wq_barrier - insert a barrier work*@pwq: pwq to insert barrier into*@barr: wq_barrier to insert*@target: target work to attach @barr to*@worker: worker currently executing @target, NULL if @target is not executing*@barr is linked to @target such that
3001  spin_unlock_irq( & he pool lock )
3012  If Not from_cancel && ( saved_max_active == 1 || rescuer) Then
3014  lock_map_acquire( & lockdep_map)
3015  lock_map_release( & lockdep_map)
3017  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
3018  Return true
3019  already_gone :
3020  spin_unlock_irq( & he pool lock )
3021  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
3022  Return false
Caller
NameDescribe
__flush_work