]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: shctx: Remove 'hot' list from shared_context
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Thu, 16 Nov 2023 16:38:19 +0000 (17:38 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Thu, 16 Nov 2023 18:35:10 +0000 (19:35 +0100)
commit3831d8454ff99cc8438769ba3ae3fbffb9414939
tree63ae90a02f8949308c52ed5367433326acaf283b
parentbd24118212f3be6b5acfa86bcb807c62aad7f2cb
MEDIUM: shctx: Remove 'hot' list from shared_context

The "hot" list stored in a shared_context was used to keep a reference
to shared blocks that were currently being used and were thus removed
from the available list (so that they don't get reused for another cache
response). This 'hot' list does not ever need to be shared across
threads since every one of them only works on their current row.

The main need behind this 'hot' list was to detach the corresponding
blocks from the 'avail' list and to have a known list root when calling
list_for_each_entry_from in shctx_row_data_append (for instance).

Since we actually never need to iterate over all members of the 'hot'
list, we can remove it and replace the inc_hot/dec_hot logic by a
detach/reattach one.
include/haproxy/shctx-t.h
include/haproxy/shctx.h
src/cache.c
src/shctx.c
src/ssl_sock.c