Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\ring_buffer.c Create Date:2022-07-28 11:53:25
Last Modify:2020-03-17 19:30:04 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:_tail_page_update - move the tail page forward

Proto:static void rb_tail_page_update(struct ring_buffer_per_cpu *cpu_buffer, struct buffer_page *tail_page, struct buffer_page *next_page)

Type:void

Parameter:

TypeParameterName
struct ring_buffer_per_cpu *cpu_buffer
struct buffer_page *tail_page
struct buffer_page *next_page
1078  old_write = local_add_return - add and return*@i: integer value to add*@l: pointer to type local_t* Atomically adds @i to @l and returns @i + @l
1079  old_entries = local_add_return - add and return*@i: integer value to add*@l: pointer to type local_t* Atomically adds @i to @l and returns @i + @l
1081  local_inc( & pages_touched)
1086  The "volatile" is due to gcc bugs ()
1093  If tail_page == READ_ONCE(write to tail ) Then
1095  val = old_write & ~The buffer page counters, write and entries, must be reset* atomically when crossing page boundaries. To synchronize this* update, two counters are inserted into the number. One is* the actual counter for the write position or count on the page.
1096  eval = old_entries & ~The buffer page counters, write and entries, must be reset* atomically when crossing page boundaries. To synchronize this* update, two counters are inserted into the number. One is* the actual counter for the write position or count on the page.
1108  local_cmpxchg( & dex for next write , old_write, val)
1109  local_cmpxchg( & ries on this page , old_entries, eval)
1116  local_set( & write committed index , 0)
1119  cmpxchg( & write to tail , tail_page, next_page)
Caller
NameDescribe
rb_move_tailThis is the slow path, force gcc not to inline it.