Commit ad1e00b
committed
MINOR: lua: handle proxy refcount
Implement proxy refcount for Lua proxy class. This is similar to the
server class.
In summary, proxy_take() is used to increment refcount when a Lua proxy
is instantiated. proxy_drop() is called via Lua garbage collector. To
ensure a deleted backend is released asap, hlua_check_proxy() now
returns NULL if PR_FL_DELETED is set.
This approach is directly dependable on Lua GC execution. As such, it
probably suffers from the same limitations as the ones already described
in the previous commit. With the current patch, "del backend" is not
directly impacted though. However, the final proxy deinit may happen
after a long period of time, which could cause memory pressure increase.
One final observations regarding deinit : it is necessary to delay a
BUG_ON() which checks that defaults proxies list is empty. Now this must
be executed after Lua deinit (called via post_deinit_list). This should
guarantee that all proxies and their defaults refcount are null.1 parent f521c2c commit ad1e00b
2 files changed
Lines changed: 70 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2824 | 2824 | | |
2825 | 2825 | | |
2826 | 2826 | | |
2827 | | - | |
2828 | | - | |
2829 | | - | |
2830 | | - | |
2831 | 2827 | | |
2832 | 2828 | | |
2833 | 2829 | | |
| |||
2838 | 2834 | | |
2839 | 2835 | | |
2840 | 2836 | | |
| 2837 | + | |
| 2838 | + | |
| 2839 | + | |
| 2840 | + | |
| 2841 | + | |
2841 | 2842 | | |
2842 | 2843 | | |
2843 | 2844 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1966 | 1966 | | |
1967 | 1967 | | |
1968 | 1968 | | |
| 1969 | + | |
| 1970 | + | |
| 1971 | + | |
| 1972 | + | |
| 1973 | + | |
| 1974 | + | |
| 1975 | + | |
1969 | 1976 | | |
1970 | 1977 | | |
1971 | | - | |
| 1978 | + | |
| 1979 | + | |
| 1980 | + | |
| 1981 | + | |
1972 | 1982 | | |
1973 | 1983 | | |
1974 | 1984 | | |
1975 | 1985 | | |
1976 | 1986 | | |
1977 | 1987 | | |
1978 | 1988 | | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
1979 | 1994 | | |
1980 | 1995 | | |
1981 | 1996 | | |
| |||
1986 | 2001 | | |
1987 | 2002 | | |
1988 | 2003 | | |
| 2004 | + | |
| 2005 | + | |
| 2006 | + | |
| 2007 | + | |
| 2008 | + | |
1989 | 2009 | | |
1990 | 2010 | | |
1991 | 2011 | | |
| |||
2024 | 2044 | | |
2025 | 2045 | | |
2026 | 2046 | | |
| 2047 | + | |
| 2048 | + | |
| 2049 | + | |
2027 | 2050 | | |
2028 | 2051 | | |
2029 | 2052 | | |
| |||
2034 | 2057 | | |
2035 | 2058 | | |
2036 | 2059 | | |
| 2060 | + | |
| 2061 | + | |
| 2062 | + | |
2037 | 2063 | | |
2038 | 2064 | | |
2039 | 2065 | | |
| |||
2044 | 2070 | | |
2045 | 2071 | | |
2046 | 2072 | | |
| 2073 | + | |
| 2074 | + | |
| 2075 | + | |
2047 | 2076 | | |
2048 | 2077 | | |
2049 | 2078 | | |
| |||
2055 | 2084 | | |
2056 | 2085 | | |
2057 | 2086 | | |
| 2087 | + | |
| 2088 | + | |
| 2089 | + | |
| 2090 | + | |
| 2091 | + | |
2058 | 2092 | | |
2059 | 2093 | | |
2060 | 2094 | | |
| |||
2066 | 2100 | | |
2067 | 2101 | | |
2068 | 2102 | | |
| 2103 | + | |
| 2104 | + | |
| 2105 | + | |
| 2106 | + | |
| 2107 | + | |
2069 | 2108 | | |
2070 | 2109 | | |
2071 | 2110 | | |
| |||
2086 | 2125 | | |
2087 | 2126 | | |
2088 | 2127 | | |
| 2128 | + | |
| 2129 | + | |
| 2130 | + | |
| 2131 | + | |
| 2132 | + | |
2089 | 2133 | | |
2090 | 2134 | | |
2091 | 2135 | | |
| |||
2096 | 2140 | | |
2097 | 2141 | | |
2098 | 2142 | | |
| 2143 | + | |
| 2144 | + | |
| 2145 | + | |
2099 | 2146 | | |
2100 | 2147 | | |
2101 | 2148 | | |
| |||
2105 | 2152 | | |
2106 | 2153 | | |
2107 | 2154 | | |
| 2155 | + | |
| 2156 | + | |
| 2157 | + | |
| 2158 | + | |
| 2159 | + | |
2108 | 2160 | | |
2109 | 2161 | | |
2110 | 2162 | | |
| |||
2114 | 2166 | | |
2115 | 2167 | | |
2116 | 2168 | | |
| 2169 | + | |
| 2170 | + | |
| 2171 | + | |
| 2172 | + | |
| 2173 | + | |
2117 | 2174 | | |
2118 | 2175 | | |
2119 | 2176 | | |
| |||
2128 | 2185 | | |
2129 | 2186 | | |
2130 | 2187 | | |
| 2188 | + | |
| 2189 | + | |
| 2190 | + | |
| 2191 | + | |
2131 | 2192 | | |
2132 | 2193 | | |
2133 | 2194 | | |
| |||
2208 | 2269 | | |
2209 | 2270 | | |
2210 | 2271 | | |
| 2272 | + | |
| 2273 | + | |
2211 | 2274 | | |
2212 | 2275 | | |
2213 | 2276 | | |
| |||
3233 | 3296 | | |
3234 | 3297 | | |
3235 | 3298 | | |
| 3299 | + | |
3236 | 3300 | | |
3237 | 3301 | | |
3238 | 3302 | | |
| |||
0 commit comments