在 2024/11/4 9:41, D. Wythe 写道: > > > On 10/29/24 2:54 PM, liqiang wrote: >> We create a lock-less link list for the currently >> idle reusable smc_buf_desc. >> >> When the 'used' filed mark to 0, it is added to >> the lock-less linked list. >> >> When a new connection is established, a suitable >> element is obtained directly, which eliminates the >> need for traversal and search, and does not require >> locking resource. >> >> A lock-free linked list is a linked list that uses >> atomic operations to optimize the producer-consumer model. > > > > No objection, but could you provide us with some data before and after the optimization ? > . I have resent this patch a few days ago with '[PATCH net-next]' prefix. It contains more detailed function time-consuming and nginx test data. You can find some test data in that email. :) Let me summarize it here: 1. The function 'smc_buf_get_slot' takes less time when a new SMC link is established, 5us->100ns (when there are 200 active links), 30us->100ns (when there are 1000 active links). 2. Using wrk and nginx to test multi-threaded short connection performance has significantly improved. Environment: QEMU emulator version 1.5.3 @ Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz Test with SMC loopback-ism. -- Best regards, Li Qiang