History

ipvs: separate destination availability state

IPVS configuration paths update destination availability while connection accounting updates destination overload state. The two independent states share dest->flags, so their read-modify-write updates can race and lose one another. Keep OVERLOAD in flags, where the preceding patch serializes its updates with dst_lock, and move AVAILABLE to cflags. This keeps configuration- controlled availability out of the scheduler hot cacheline until a scheduler needs to check it. It also prevents availability updates from clobbering overload state. The destination status bits are not exposed through the IPVS sockopt or netlink interfaces, so keep their definitions in the internal IPVS header. Readers can still observe stale destination state; this does not provide a cross-field snapshot.

Yizhou Zhao committed 3 months ago

Commit cdcc4e41 parent 8f843449 files · +23 −22Browse files

Showing the changes to include/uapi/linux (1 of 9 files). Show all

Unified · Split

include/uapi/linux/ip_vs.h+0−6
@@ -28,12 +28,6 @@ · 27 unmodified lines
28#define IP_VS_SVC_F_SCHED_SH_FALLBACK IP_VS_SVC_F_SCHED1 /* SH fallback */28#define IP_VS_SVC_F_SCHED_SH_FALLBACK IP_VS_SVC_F_SCHED1 /* SH fallback */
29#define IP_VS_SVC_F_SCHED_SH_PORT IP_VS_SVC_F_SCHED2 /* SH use port */29#define IP_VS_SVC_F_SCHED_SH_PORT IP_VS_SVC_F_SCHED2 /* SH use port */
30 30
31/*
32 * Destination Server Flags
33 */
34#define IP_VS_DEST_F_AVAILABLE 0x0001 /* server is available */
35#define IP_VS_DEST_F_OVERLOAD 0x0002 /* server is overloaded */
36
37/*31/*
38 * IPVS sync daemon states32 * IPVS sync daemon states
39 */33 */