Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:bfq_get_queue

Proto:static struct bfq_queue *bfq_get_queue(struct bfq_data *bfqd, struct bio *bio, bool is_sync, struct bfq_io_cq *bic)

Type:struct bfq_queue

Parameter:

TypeParameterName
struct bfq_data *bfqd
struct bio *bio
boolis_sync
struct bfq_io_cq *bic
5130  ioprio = IOPRIO_PRIO_DATA( per (request_queue, blkcg) ioprio )
5131  ioprio_class = IOPRIO_PRIO_CLASS( per (request_queue, blkcg) ioprio )
5132  struct bfq_queue * * async_bfqq = NULL
5136  _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
5138  bfqg = bfq_find_set_group(bfqd, __bio_blkcg - internal, inconsistent version to get blkcg* DO NOT USE.* This function is inconsistent and consequently is dangerous to use. The* first part of the function returns a blkcg where a reference is owned by the* bio)
5139  If Not bfqg Then
5140  bfqq = fallback dummy bfqq for extreme OOM conditions
5141  Go to out
5144  If Not is_sync Then
5145  async_bfqq = bfq_async_queue_prio(bfqd, bfqg, ioprio_class, ioprio)
5147  bfqq = async_bfqq
5148  If bfqq Then Go to out
5152  bfqq = kmem_cache_alloc_node(bfq_pool, GFP_NOWAIT | __GFP_ZERO | DOC: Action modifiers* Action modifiers* ~~~~~~~~~~~~~~~~* %__GFP_NOWARN suppresses allocation failure reports.* %__GFP_COMP address compound page metadata.* %__GFP_ZERO returns a zeroed page on success., node)
5156  If bfqq Then
5157  bfq_init_bfqq(bfqd, bfqq, bic, pid, is_sync)
5159  bfq_init_entity( & ity representing this queue in the scheduler , bfqg)
5160  bfq_log_bfqq(bfqd, bfqq, "allocated")
5161  Else
5162  bfqq = fallback dummy bfqq for extreme OOM conditions
5163  bfq_log_bfqq(bfqd, bfqq, "using oom bfqq")
5164  Go to out
5171  If async_bfqq Then
5178  ce counter ++
5179  bfq_log_bfqq(bfqd, bfqq, "get_queue, bfqq not in async: %p, %d", bfqq, ce counter )
5181  async_bfqq = bfqq
5184  out :
5185  ce counter ++
5186  bfq_log_bfqq(bfqd, bfqq, "get_queue, at end: %p, %d", bfqq, ce counter )
5187  _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()
5188  Return bfqq
Caller
NameDescribe
bfq_check_ioprio_change
bfq_get_bfqq_handle_split