From 66aeb467de80c92a099e49eaad6c25974c96f9cf Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 12 Oct 2017 19:08:18 +0200 Subject: pkg/ipc: don't send program padding to executor Currently we always send 2MB of data to executor in ipc_simple.go. Send only what's consumed by the program, and don't send the trailing zeros. Serialized programs usually take only few KBs. --- pkg/ipc/ipc_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/ipc/ipc_linux.go') diff --git a/pkg/ipc/ipc_linux.go b/pkg/ipc/ipc_linux.go index 793611b91..0279b0ee8 100644 --- a/pkg/ipc/ipc_linux.go +++ b/pkg/ipc/ipc_linux.go @@ -128,7 +128,7 @@ func (env *Env) Close() error { func (env *Env) Exec(opts *ExecOpts, p *prog.Prog) (output []byte, info []CallInfo, failed, hanged bool, err0 error) { if p != nil { // Copy-in serialized program. - if err := p.SerializeForExec(env.in, env.pid); err != nil { + if _, err := p.SerializeForExec(env.in, env.pid); err != nil { err0 = fmt.Errorf("executor %v: failed to serialize: %v", env.pid, err) return } -- cgit mrf-deployment