Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:g_buffer_alloc_read_page - allocate a page to read from buffer*@buffer: the buffer to allocate for

Proto:void *ring_buffer_alloc_read_page(struct ring_buffer *buffer, int cpu)

Type:void

Parameter:

TypeParameterName
struct ring_buffer *buffer
intcpu
4596  struct buffer_data_page * bpage = NULL
4600  If Not pumask_test_cpu - test for a cpu in a cpumask*@cpu: cpu number (< nr_cpu_ids)*@cpumask: the cpumask pointer* Returns 1 if @cpu is set in @cpumask, else returns 0 Then Return ERR_PTR( - ENODEV)
4603  cpu_buffer = buffers[cpu]
4604  local_irq_save(flags)
4605  r sched/core.c and kernel_lock.c: ( & lock)
4607  If free_page Then
4608  bpage = free_page
4609  free_page = NULL
4612  arch_spin_unlock( & lock)
4613  local_irq_restore(flags)
4615  If bpage Then Go to out
4618  page = Allocate pages, preferring the node given as nid. When nid == NUMA_NO_NODE,* prefer the current CPU's closest node. Otherwise node must be valid and* online.
4620  If Not page Then Return ERR_PTR( - ENOMEM)
4623  bpage = page_address(page)
4625  out :
4626  rb_init_page(bpage)
4628  Return bpage
Caller
NameDescribe
read_page
tracing_buffers_read
tracing_buffers_splice_read