[libvirt PATCH] meson: remove obsolete comment about stack frame size

Daniel P. Berrangé posted 1 patch 5 days, 19 hours ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20210408130016.478974-1-berrange@redhat.com
meson.build | 3 ---
1 file changed, 3 deletions(-)

[libvirt PATCH] meson: remove obsolete comment about stack frame size

Posted by Daniel P. Berrangé 5 days, 19 hours ago
The virStrerror function no longer exists in libvirt so is not a
constraint. At the current stack limit of 4k, and default Linux
stack size of 8 MB, we have a recursion limit of 2048 in the
absolute worst case, and much higher in common case. Even with
smaller stack sizes, we're going to be fine as we don't deeply
recurse in code.

Thus it is not worth spending effort to optimize below our current
4k worst case limit. Removing the comment will stop encouraging
people to spend time on this in future.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 meson.build | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/meson.build b/meson.build
index 97d9c52165..a521d148d5 100644
--- a/meson.build
+++ b/meson.build
@@ -409,9 +409,6 @@ cc_flags += [
   # but need to rewrite various areas of code first
   '-Wno-format-truncation',
 
-  # This should be < 256 really. Currently we're down to 4096,
-  # but using 1024 bytes sized buffers (mostly for virStrerror)
-  # stops us from going down further
   '-Wframe-larger-than=4096',
 
   # extra special flags
-- 
2.30.2

Re: [libvirt PATCH] meson: remove obsolete comment about stack frame size

Posted by Pavel Hrdina 5 days, 19 hours ago
On Thu, Apr 08, 2021 at 02:00:16PM +0100, Daniel P. Berrangé wrote:
> The virStrerror function no longer exists in libvirt so is not a
> constraint. At the current stack limit of 4k, and default Linux
> stack size of 8 MB, we have a recursion limit of 2048 in the
> absolute worst case, and much higher in common case. Even with
> smaller stack sizes, we're going to be fine as we don't deeply
> recurse in code.
> 
> Thus it is not worth spending effort to optimize below our current
> 4k worst case limit. Removing the comment will stop encouraging
> people to spend time on this in future.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  meson.build | 3 ---
>  1 file changed, 3 deletions(-)

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>