mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-21 11:15:16 +04:00
Upstream DNSMASQ 2.93 includes a complete rework of memory (re)allocation for the cache. Intended to avoid memory use growth due to fragmentation upon repeated cache reloads (e.g. by SIGHUP to reload local host files), this change makes memory allocation for hosts an O(N^2) algorithm, which explains large slowdowns for reading large host files on start, or (re)reading them on SIGHUP. A fix is available on upstream's main ( https://thekelleys.org.uk/gitweb-noai/?p=dnsmasq.git;a=commit;h=a9cb3971c695e0132f52a225b80c604ed47864f3 ), with a subsequent tweak to reduce memory usage ( https://thekelleys.org.uk/gitweb-noai/?p=dnsmasq.git;a=commit;h=baf85a8f38aaa601eb8f05aee01adb5547d40888 ). Both of these upstream commits apply cleanly to release 2.93. This commit cherry picks those commits to apply on top of 2.93. These patches can be removed once DNSMASQ 2.94 is released. Signed-off-by: Tyrel M. McQueen <tmcqueen.materials@gmail.com> Link: https://github.com/openwrt/openwrt/pull/25998 Signed-off-by: Robert Marko <robimarko@gmail.com>