Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH] region: take allocated region size instead of used one
@ 2020-01-27 19:33 Georgy Kirichenko
  2020-01-27 20:26 ` Georgy Kirichenko
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Georgy Kirichenko @ 2020-01-27 19:33 UTC (permalink / raw)
  To: tarantool-patches

As region has cached but not used slabs take the full region size
in account while fiber gc.

Fixes #4736

diff --git a/src/lib/core/fiber.c b/src/lib/core/fiber.c
index 00ae8cded..f795dc566 100644
--- a/src/lib/core/fiber.c
+++ b/src/lib/core/fiber.c
@@ -774,7 +774,7 @@ fiber_self()
 void
 fiber_gc(void)
 {
-	if (region_used(&fiber()->gc) < 128 * 1024) {
+	if (region_total(&fiber()->gc) < 128 * 1024) {
 		region_reset(&fiber()->gc);
 		return;
 	}
-- 
2.25.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-02-04 21:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-27 19:33 [Tarantool-patches] [PATCH] region: take allocated region size instead of used one Georgy Kirichenko
2020-01-27 20:26 ` Georgy Kirichenko
2020-01-29 21:50 ` Konstantin Osipov
2020-02-04 21:25 ` Vladislav Shpilevoy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox