From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> To: Igor Munkin <imun@tarantool.org>, Sergey Ostanevich <sergos@tarantool.org> Cc: tarantool-patches@dev.tarantool.org Subject: Re: [Tarantool-patches] [PATCH 2/2] box: reduce box_process_lua Lua GC memory usage Date: Sat, 20 Jun 2020 19:42:53 +0200 [thread overview] Message-ID: <4150e5b8-b4c0-7151-d06e-a61d81eff97b@tarantool.org> (raw) In-Reply-To: <7b8e95f3d6da39f0c3c6ca742abccddda817ac5e.1592597647.git.imun@tarantool.org> Hi! Thanks for the patch! On 19/06/2020 22:40, Igor Munkin wrote: > <box_process_lua> function created a new GCfunc object for a handler > having no upvalues depending on the request context on each call. > > The changes introduces the folliwing mapping: Either 'changes' -> 'change', or 'introduces' -> 'introduce'. 'folliwing' -> 'following'. > | <handler id> -> <handler GCfunc object> > Initializing this mapping on Tarantool startup is aimed to reduce Lua GC > memory usage. > > Signed-off-by: Igor Munkin <imun@tarantool.org> > --- > src/box/lua/call.c | 32 +++++++++++++++++++++++++++----- > 1 file changed, 27 insertions(+), 5 deletions(-) > > diff --git a/src/box/lua/call.c b/src/box/lua/call.c > index 6588ec2fa..e1b1a5e81 100644 > --- a/src/box/lua/call.c > +++ b/src/box/lua/call.c > @@ -48,6 +48,15 @@ > #include "mpstream/mpstream.h" > #include "box/session.h" > > +enum handlers { > + HANDLER_CALL, > + HANDLER_CALL_BY_REF, > + HANDLER_EVAL, > + HANDLER_MAX, Would be nice to have a comment here explaining why so complex. Why lua_pushcfunction() can't be used on each call. > +}; > + > +static int execute_lua_refs[HANDLER_MAX]; > + > /** > * A helper to find a Lua function by name and put it > * on top of the stack.
next prev parent reply other threads:[~2020-06-20 17:42 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-06-19 20:50 [Tarantool-patches] [PATCH 0/2] Reduce Lua GC pressure in Tarantool Igor Munkin 2020-06-19 20:40 ` [Tarantool-patches] [PATCH 1/2] test: disable JIT for Lua Fun totable function Igor Munkin 2020-06-21 10:26 ` Sergey Ostanevich 2020-06-21 20:24 ` Igor Munkin 2020-06-25 9:43 ` Sergey Ostanevich 2020-06-26 11:11 ` Igor Munkin 2020-06-26 13:11 ` Igor Munkin 2020-06-23 18:04 ` Igor Munkin 2020-06-23 18:45 ` Alexander V. Tikhonov 2020-06-23 21:58 ` Igor Munkin 2020-06-19 20:40 ` [Tarantool-patches] [PATCH 2/2] box: reduce box_process_lua Lua GC memory usage Igor Munkin 2020-06-20 17:42 ` Vladislav Shpilevoy [this message] 2020-06-20 21:24 ` Igor Munkin 2020-06-21 10:27 ` Sergey Ostanevich 2020-06-21 10:40 ` Igor Munkin 2020-06-21 15:35 ` Vladislav Shpilevoy 2020-06-21 19:09 ` Igor Munkin 2020-06-22 22:54 ` [Tarantool-patches] [PATCH 0/2] Reduce Lua GC pressure in Tarantool Vladislav Shpilevoy 2020-06-23 21:06 ` Vladislav Shpilevoy 2020-06-23 21:58 ` Igor Munkin 2020-06-23 21:59 ` Igor Munkin 2020-06-27 13:22 ` Igor Munkin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=4150e5b8-b4c0-7151-d06e-a61d81eff97b@tarantool.org \ --to=v.shpilevoy@tarantool.org \ --cc=imun@tarantool.org \ --cc=sergos@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH 2/2] box: reduce box_process_lua Lua GC memory usage' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox