Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__blk_mq_sched_bio_merge

Proto:bool __blk_mq_sched_bio_merge(struct request_queue *q, struct bio *bio, unsigned int nr_segs)

Type:bool

Parameter:

TypeParameterName
struct request_queue *q
struct bio *bio
unsigned intnr_segs
327  e = elevator
328  ctx = This assumes per-cpu software queueing queues. They could be per-node* as well, for instance. For now this is hardcoded as-is. Note that we don't* care about preemption, since we know the ctx's are persistent. This does
329  hctx = lk_mq_map_queue() - map (cmd_flags,type) to hardware queue*@q: request queue*@flags: request command flags*@cpu: cpu ctx
330  bool ret = false
333  If e && bio_merge Then Return bio_merge(hctx, bio, nr_segs)
336  type = @type: HCTX_TYPE_* flags. Type of hardware queue.
337  If @flags: BLK_MQ_F_* flags. Defines the behaviour of the queue. & BLK_MQ_F_SHOULD_MERGE && Not list_empty_careful - tests whether a list is empty and not being modified*@head: the list to test* Description:* tests whether a list is empty _and_ checks that no other CPU might be* in the process of modifying either member (next or prev)* NOTE: using Then
340  spin_lock( & lock)
341  ret = Reverse check our software queue for entries that we could potentially* merge with. Currently includes a hand-wavy stop count of 8, to not spend* too much time checking for merges.
342  spin_unlock( & lock)
345  Return ret
Caller
NameDescribe
blk_mq_sched_bio_merge