The optimization reduces one judgment in read operations, improving write performance by 3% and read performance by 10%.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit implemented seqlock for non-SMP platforms, which achieves
1.62x performance improvement.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
This commit improved the seqlock performance on non-SMP and SMP
platforms by 31.7% on average (83Mops -> 106Mops, tested on qemu-intel64/KVM).
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
This commit provided a better implementation of the seqlock, which
ensure the functional correctness and provide better performance.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
This commit removed unnecessary memory barriers of the seqlock
implementation, since they may block the CPU pipeline and lead to
performance degradation.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
03:17:57 /home/work/ssd1/workspace/Vela-Multi-Boards-dev-system-Build@2/nuttx/include/nuttx/seqlock.h: In function 'read_seqbegin':
03:17:57 /home/work/ssd1/workspace/Vela-Multi-Boards-dev-system-Build@2/nuttx/include/nuttx/seqlock.h:107:3: error: 'asm' undeclared (first use in this function)
03:17:57 SMP_RMB();
03:17:57 ^
03:17:57 /home/work/ssd1/workspace/Vela-Multi-Boards-dev-system-Build@2/nuttx/include/nuttx/seqlock.h:107:3: note: each undeclared identifier is reported only once for each function it appears in
03:17:57 /home/work/ssd1/workspace/Vela-Multi-Boards-dev-system-Build@2/nuttx/include/nuttx/seqlock.h:107:3: error: expected ';' before 'volatile'
03:17:57 SMP_RMB();
03:17:57 ^
Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
This commit moved the g_wdtimernested to sched_timerexpiration, since
wdog and hrtimer can share it.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
This commit changed the return value semantics.
In past designs, timers that were expected to fire immediately were delayed by at least one tick, resulting in a decrease in real-time performance.
This commit re-encoded the return value to allow the timers fire
immediately.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
When triggering TCP retransmission through a timer, conn->unacked_q will save more packets, which may result in sndseq being equal to ackseq. Previous implementations may cause conn->nrtx to not be cleared, leading to an increase in conn->rto errors and a longer timer time
Signed-off-by: wangchen <wangchen41@xiaomi.com>
The modification is to solve the problem that the opposite end cannot receive the retransmission message, and the protocol stack no longer sends retransmission messages
Signed-off-by: wangchen <wangchen41@xiaomi.com>
when C++ lib has an atomic implementation, we shouldn't include NuttX defined macros to avoid conflicts
Fix errors like:
build/include/libcxx/__atomic/atomic.h:445:1: error: expected identifier before numeric constant
445 | atomic_fetch_add(volatile atomic<_Tp>* __o, typename atomic<_Tp>::difference_type __op) _NOEXCEPT
| ^~~~~~~~~~~~~~~~
Signed-off-by: raiden00pl <raiden00@railab.me>
We don't need to subtract the block size; we only need to determine if it's within the interrupt memory range.
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Userled register path shouldn't depend on LED example.
This dependency is broken, kernel code should not depend on apps code.
Signed-off-by: raiden00pl <raiden00@railab.me>
This commit add the option that was missing in the esp32_start.c
to ignore the chip version for boards with old ESP32 silicon tape out.
Signed-off-by: Alan C. Assis <acassis@gmail.com>
Fix LED handling for nucleo-c092rc and nucleo-c071rb.
These boards have two LEDs but one is activated with HIGH the other is activated
with LOW.
Also fix userled registration.
Signed-off-by: raiden00pl <raiden00@railab.me>
This reverts commit 29e50ffa73.
reason:
Placing the main thread and the gourd in the same memory block, and allocating and freeing memory simultaneously, presents the following two problems:
When the main thread creates a child thread and performs a detach operation, there is a possibility that the main thread may have exited, but the main thread's TCB (Transaction Control Block) may not have been released.
This could potentially cause the main thread's TCB to be double-freed. The core contradiction in this problem lies in binding the main thread's TCB (Trust Container Registry) and the group together. When releasing the main thread's TCB, an additional check is needed to ensure the main thread was the last to leave the group. If this check and the free operation are atomically guaranteed, the logic is sound, and double freeing won't occur. However, this atomicity cannot be completely guaranteed. If other free operations cause a block, problems still arise.
Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
Add support for the QMI8658 6-axis IMU sensor (accelerometer + gyroscope)
on the lckfb-szpi-esp32s3 board.
Changes:
- New esp32s3_qmi8658.c driver initializes sensor on I2C0 at address 0x6A
- Registers uORB devices: /dev/uorb/sensor_accel0 and /dev/uorb/sensor_gyro0
- Adds esp32s3_qmi8658_initialize() function declaration to header
- Integrates with board bringup when CONFIG_SENSORS_QMI8658=y
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>