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:50
Last Modify:2020-03-17 19:30:04 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:rb_insert_pages

Proto:static int rb_insert_pages(struct ring_buffer_per_cpu *cpu_buffer)

Type:int

Parameter:

TypeParameterName
struct ring_buffer_per_cpu *cpu_buffer
1609  pages = w pages to add
1612  raw_spin_lock_irq( & serialize readers )
1627  retries = 10
1628  success = 0
1629  When retries-- cycle
1634  head_page = list of buffer pages
1635  If Not head_page Then Break
1637  prev_page = prev
1639  first_page = next
1640  last_page = prev
1642  head_page_with_bit = head_page | RB_PAGE_HEAD
1645  next = head_page_with_bit
1646  prev = prev_page
1648  r = cmpxchg( & next, head_page_with_bit, first_page)
1650  If r == head_page_with_bit Then
1656  prev = last_page
1657  success = 1
1658  Break
1662  If success Then Initialization list head
1668  uffer may be either ring_buffer or ring_buffer_per_cpu (cpu_buffer, !success)
1669  raw_spin_unlock_irq( & serialize readers )
1672  If Not success Then
1676  list_del_init - deletes entry from list and reinitialize it.*@entry: the element to delete from the list.
1677  Also stolen from mm/slob.c. Thanks to Mathieu Desnoyers for pointing* this issue out.
1680  Return success
Caller
NameDescribe
rb_update_pages