haproxy/include/common
Olivier Houchard 899fb8abdc MINOR: memory: Change the flush_lock to a spinlock, and don't get it in alloc.
The flush_lock was introduced, mostly to be sure that pool_gc() will never
dereference a pointer that has been free'd. __pool_get_first() was acquiring
the lock to, the fear was that otherwise that pointer could get free'd later,
and then pool_gc() would attempt to dereference it. However, that can not
happen, because the only functions that can free a pointer, when using
lockless pools, are pool_gc() and pool_flush(), and as long as those two
are mutually exclusive, nobody will be able to free the pointer while
pool_gc() attempts to access it.
So change the flush_lock to a spinlock, and don't bother acquire/release
it in __pool_get_first(), that way callers of __pool_get_first() won't have
to wait while the pool is flushed. The worst that can happen is we call
__pool_refill_alloc() while the pool is getting flushed, and memory can
get allocated just to be free'd.

This may help with github issue #552

This may be backported to 2.1, 2.0 and 1.9.
2020-03-18 15:55:35 +01:00
..
base64.h
buf.h MINOR: buf: Add function to insert a string at an absolute offset in a buffer 2020-03-06 14:12:59 +01:00
buffer.h MEDIUM: buffer: remove the buffer_wq lock 2020-02-26 10:39:36 +01:00
cfgparse.h
chunk.h MINOR: chunk: implement chunk_strncpy() to copy partial strings 2020-02-14 19:02:06 +01:00
compat.h MINOR: debug: use our own backtrace function on clang+x86_64 2020-03-04 12:04:07 +01:00
compiler.h MINOR: debug: add a new DISGUISE() macro to pass a value as identity 2020-03-14 10:52:46 +01:00
config.h MINOR: compiler: move CPU capabilities definition from config.h and complete them 2020-02-21 16:32:57 +01:00
debug.h MINOR: debug: consume the write() result in BUG_ON() to silence a warning 2020-03-14 10:58:35 +01:00
defaults.h CLEANUP: assorted typo fixes in the code and comments 2020-03-14 09:42:07 +01:00
errors.h
fcgi.h
h1.h CLEANUP: assorted typo fixes in the code and comments 2020-03-14 09:42:07 +01:00
h2.h MINOR: h2: add a function to report H2 error codes as strings 2019-11-25 11:34:26 +01:00
hash.h BUG/MAJOR: hashes: fix the signedness of the hash inputs 2020-01-16 08:23:42 +01:00
hathreads.h MEDIUM: fd: Introduce a running mask, and use it instead of the spinlock. 2020-03-17 15:30:07 +01:00
hpack-dec.h
hpack-enc.h
hpack-huff.h
hpack-tbl.h CLEANUP: assorted typo fixes in the code and comments 2020-03-14 09:42:07 +01:00
http-hdr.h
http.h CLEANUP: assorted typo fixes in the code and comments 2020-03-14 09:42:07 +01:00
htx.h CLEANUP: assorted typo fixes in the code and comments 2020-03-14 09:42:07 +01:00
initcall.h
ist.h CLEANUP: assorted typo fixes in the code and comments 2020-03-14 09:42:07 +01:00
istbuf.h
memory.h MINOR: memory: Change the flush_lock to a spinlock, and don't get it in alloc. 2020-03-18 15:55:35 +01:00
mini-clist.h MINOR: lists: fix indentation. 2020-03-11 21:41:13 +01:00
namespace.h
net_helper.h CLEANUP: net_helper: Do not negate the result of unlikely 2020-02-25 07:30:49 +01:00
openssl-compat.h CLEANUP: ssl: remove unused functions in openssl-compat.h 2020-02-14 16:15:00 +01:00
regex.h CLEANUP: assorted typo fixes in the code and comments 2020-03-14 09:42:07 +01:00
standard.h MINOR: use DISGUISE() everywhere we deliberately want to ignore a result 2020-03-14 11:04:49 +01:00
template.h
ticks.h
time.h BUILD: remove obsolete support for -mregparm / USE_REGPARM 2020-02-25 07:41:47 +01:00
tools.h BUG/MINOR: ssl: ssl_sock_load_pem_into_ckch is not consistent 2020-01-22 15:55:55 +01:00
uri_auth.h
version.h MINOR: version: this is development again, update the status 2019-11-25 20:38:32 +01:00
xref.h CLEANUP: assorted typo fixes in the code and comments 2020-03-14 09:42:07 +01:00