Commit Graph

1177 Commits

Author SHA1 Message Date
fengbojiang ac0321e70e Add refcoount in sc for fork and detach. 2023-04-23 11:32:33 +08:00
fengbojiang dd7dc378ef opt code. 2023-04-23 10:51:56 +08:00
fengbojiang cf587718c2 set cpu affinity in main_stack_thread_socket.c. 2023-04-19 13:54:10 +08:00
fengbojiang 3cd0ab86b6 1. Reduce the number of locks with dirty read first, and then try to lock sc and real read. QPS:360k -> 380k.
2. memory alignment. QPS:380k -> 400k.
2023-04-14 14:37:15 +08:00
fengbojiang 4af5a643fb 1. Fixed some issue that sem_timewait and sem_post.
2. Modify timeout of epoll_wait/kevent from 100us to 100ms by default.
3. set cpu affinity in main_stack_epoll_thread socket.
2023-04-13 19:27:57 +08:00
fengbojiang d3fabc9cef some opt. 2023-04-13 19:05:46 +08:00
fengbojiang e45925dd79 Don't free the memory malloc with rte_malloc in most commonly used socket API, to improve proformance.
The performance of single instance from 200,000 QPS improve to 260,000QPS.
NOTE:May cause memory leak.
2023-04-12 18:57:59 +08:00
fengbojiang dfb462caa7 Save the event num kevent or epoll_wait returned, Use for burst process event in one F-Stack loop to improve performance.
The performance of single instance improve from 4500 QPS to 200, 000
QPS.
2023-04-12 18:55:27 +08:00
fengbojiang f85c52e341 Don't sleep while no event triggerd in demo. 2023-04-12 17:49:16 +08:00
fengbojiang 2471d2560c Modify some log. 2023-04-12 17:48:39 +08:00
fengbojiang 739ea21764 Add some log. 2023-04-12 12:03:34 +08:00
fengbojiang 03b606ff9b Support timeout is NULL or 0 in libffsyscall.so.
And support it in main_stack.c.
2023-04-12 12:00:53 +08:00
fengbojiang e58d683b24 burst copy in ff_hook_epoll_wait. 2023-04-12 10:15:22 +08:00
fengbojiang 1d09ad5003 Fixed some issue that check the return value of sem_timedwait. 2023-04-11 17:51:34 +08:00
fengbojiang 8766cedde1 Add timeout in kevent. 2023-04-08 09:29:50 +08:00
fengbojiang f27d862f85 1. Add kevent demo, need link libff_syscall.so, not LD_PRELOAD.
2. Fix some issues.
2023-04-07 20:39:31 +08:00
fengbojiang e8ed03b521 Modify FF_SOCKET_THREAD disable by default. 2023-04-07 13:44:41 +08:00
johnjiang 30907c8c55
Merge pull request #751 from wenchengji159357/dev
Dev
2023-04-07 12:35:56 +08:00
fengbojiang 88318c48c4 Fix lock issue. 2023-04-07 12:00:02 +08:00
fengbojiang c0677726be Add main_stack_epoll_pipeline, and must disable FF_THREAD_SOCKET before build adapter. 2023-04-07 11:27:34 +08:00
fengbojiang 5a01e6f99b Optimize some code of main_stack_epoll. 2023-04-07 11:26:30 +08:00
fengbojiang baceb8fd64 1. Add FF_PROC_ID environment variable to fix the issue that secondary APP's process get sc
from the first ff_so_zone.
2. SIGINT can destructor sc.
2023-04-07 10:43:37 +08:00
fengbojiang 7492bfbcb6 Add helloworld_stack_epoll for demo. 2023-04-06 21:53:02 +08:00
fengbojiang 799c39d5f0 Fix the issue that not detach sc while destructor in exit. 2023-04-06 21:48:57 +08:00
fengbojiang 0efc8b3374 Fixed some issue in multi instances. 2023-04-06 19:09:55 +08:00
fengbojiang edcac626c5 Optimize some code. 2023-04-06 18:23:35 +08:00
fengbojiang fe7e360eca Add FF_THREAD_SOCKET in Makefile, Whether to use thread-level socket,
default enable.
2023-04-06 18:02:47 +08:00
fengbojiang 865ab0ed63 Add adapter for LD_PRELOAD, TBC. 2023-04-06 15:02:39 +08:00
fengbojiang c0cab32e5f remove some wrong characters. 2023-03-31 10:23:48 +08:00
fengbojiang efd35b83ad Output a extra line. 2023-03-31 10:22:19 +08:00
wenchengji fd994c50c8
Merge branch 'F-Stack:dev' into dev 2023-03-24 18:19:20 +08:00
wenchengji e12daec8ec When entering the softclock function for the first time,ticks is 2147423648,cc_softticks is 0.
Approximately 30 seconds later, ticks and cc_softticks become equal, allowing the while loop to be exited.
2023-03-24 09:56:31 +00:00
johnjiang 7201280ad1
Merge pull request #746 from uvletter/fix_vtoslab
Fix vtoslab doesn't return the correct slab
2023-03-13 12:15:26 +08:00
zhutian 5ed6baeedb fix that vtoslab doesn't return the correct slab 2023-03-03 21:01:53 +08:00
fengbojiang e63c364c3c Modify `pci_whitelist` to `allow` that from DPDK 20.11. Close #745. 2023-03-02 11:03:25 +08:00
fengbojiang 8020e2669c Modify `pci_whitelist` to `allow` that from DPDK 20.11. Close #745. 2023-03-02 10:59:55 +08:00
fengbojiang 9e149018e3 Add header file `#include <sys/ioctl.h>` in `example/mai.c`. 2023-02-17 19:13:42 +08:00
fengbojiang 7b98ccb479 1. Set non blocking in `example/main.c`.
2. Add some description of `ff_socket()` and `ff_write()`.
3. Ref #709.
2023-02-17 19:10:41 +08:00
fengbojiang 06553fe07a Code formatting fine-tuning for `example/main_zc`. 2023-02-17 19:09:53 +08:00
fengbojiang c0a9f536ca Fixed #705. While Adding -DNDEBUG flag will cause the helloworld example
to crash. Because `assert((kq = ff_kqueue()) > 0);` was be ignored and
nevents used usigned type.
2023-02-16 17:17:10 +08:00
fengbojiang c35e5fda17 Fix Compile Error with gcc 11.3.0(in Ubuntu 22.04). Close #736. 2023-02-16 15:14:27 +08:00
fengbojiang 761dee801d Add VERSION file in root dir directory and upgrade version to 1.23. 2023-02-15 19:21:58 +08:00
fengbojiang e14457fdc5 Redis can listen IPv6 address. 2023-02-15 18:18:09 +08:00
fengbojiang a47b734625 Fix the issue that setting `net.inet6.ip6.forwarding=1` does not take effect. 2023-02-14 17:09:00 +08:00
fengbojiang e592cbbfec While use bbr, the `hz` should be set to 1000000, match the bintime and timer of F-Stack. Ref #701 #702. 2023-02-14 17:03:20 +08:00
fengbojiang 5f7fc57d11 While use bbr, the `hz` should be set to 1000000, match the bintime and timer of F-Stack. Ref #701 #702. 2023-02-14 17:01:34 +08:00
johnjiang 74c19adff2
Merge pull request #728 from wenchengji159357/dev
Dev
2023-01-12 11:08:48 +08:00
wenchengji 0f015b3f5d when nginx use setsockopt ON_LINGER, the seq number of the RST packet is error.
Use tcpdump to capture packets and you will find the problem.
See:https://reviews.freebsd.org/D30036.
2023-01-09 06:51:16 +00:00
fengbojiang 3c7b637d18 tcp: Missing mfree in rack and bbr.
See:https://reviews.freebsd.org/D30727.
2023-01-06 10:35:50 +08:00
fengbojiang a816e89636 Fix #702 F-stack rack and BBR both causes PCB memory leak.
Because `net.inet.tcp.hpts.skip_swi=1` takes effect after
`mi_startup()` in `ff_freebsd_init()`.
2023-01-06 04:10:02 +08:00