Principles of using eBPF in Android and examples of kprobe dmabuf_setup

Table of Contents eBPF in Android Android eBPF kprobe dma code Define a MAP Define a PROG bpfprogs/Android.bp test program bpfprogs/memstats/Android.bp bpfprogs/memstats/MemStats.h bpfprogs/memstats/MemStats.cpp bpfprogs/memstats/MemStatsMain.cpp Compile and run Result analysis summary eBPF in Android Official website: https://source.android.com/docs/core/architecture/kernel/bpf?hl=zh-cn#tracepoints The official Android website has a more detailed introduction. For official examples of using eBPF in Android, you can […]

Serial communication based on interrupt/DMA mode

1. Introduction to serial port interrupts 1. Serial port sending/receiving function HAL_UART_Transmit(); Serial port sends data, using timeout management mechanism HAL_UART_Receive(); The serial port receives data and uses the timeout management mechanism HAL_UART_Transmit_IT(); Serial port interrupt mode transmission HAL_UART_Receive_IT(); Serial port interrupt mode reception HAL_UART_Transmit_DMA(); Serial port DMA mode transmission HAL_UART_Transmit_DMA(); Serial port DMA mode […]

ceph_msg message module_RDMA_Performance testing tool source code process analysis_src_test_msgr_perf_msgr_server_client.cc

src/test/msgr/perf_msgr_server.cc server, server, establish connection MessengerServer Messenger *Messenger::create type=async + rdma, lname=server -> Messenger *Messenger::create new AsyncMessenger -> AsyncMessenger::AsyncMessenger dispatch_queue DispatchQueue(CephContext *cct, Messenger *msgr, string & name) local fast distribution, throttle lookup_or_create_singleton_object<StackSingleton> single->ready(transport_type) NetworkStack::create(cct, type) -> std::make_shared<RDMAStack>(c, t) RDMAStack::RDMAStack NetworkStack(cct, t) structure, the thread pool has 3 threads by default, create_worker(cct, type, worker_id) -> NetworkStack::create_worker […]

Interrupt mode and DMA mode complete serial communication

Article directory 1. Basic introduction to DMA 2. Complete tasks by interrupting 1. Use STM32CubeMX to create a new project 2. Code writing 3. Hardware implementation 3. Complete the task using DMA method 1. Use STM32CubeMX to create a new project 2. Code writing 3. Demonstration of running results 4. Reference materials 1. Basic introduction […]

GD32L23X USART+DMA idle interrupt to send and receive data

GD32L23X USART + DMA idle interrupt to send and receive data DMA + USART1 sends and receives data Idle interrupt function and macro definition USART1 Understanding of hardware flow control concepts (need to add two more lines) DMA DMA direct memory access controller DMAMUX basic functions printf redefinition DMA + USART1 sends and receives data […]

[STM32 uses the HAL library to implement DMA mode serial port to send and receive data, logic simulator, and baud rate calculation]

Write the directory title here 1. Introduction to DMA 1. DMA four transmission paths 2. Core parameters 3. DMA channel resources in STM32 4. DMA workflow (1) Kernel workflow without DMA (4) DMA transfer mode (5) Arbiter and priority (6) DMA interrupt Create CubeMX project main code Effect demonstration! [Insert picture description here](https://img-blog.csdnimg.cn/82410eb5a84b4e3a92f52a9d0fd6cc76.png) Logic simulator […]

Serial communication based on interrupt/DMA mode

1. Introduction to serial communication protocol and RS-232 and the working principle of USB/TTL to 232 module 1. Serial protocol and RS-232 standard: (1) Serial port protocol: Serial Communication is a very commonly used serial communication method between devices. Because it is simple and convenient, most electronic devices support this communication method. Electronic engineers often […]