summaryrefslogtreecommitdiff
path: root/libpod/oci.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-01-22 16:12:51 -0600
committerAtomic Bot <atomic-devel@projectatomic.io>2018-01-23 14:20:41 +0000
commita03e040f0bb1d32645879b2c8bec7c5e1fe0561f (patch)
treed7e7e061dcb6168d654674a84d4cc84e99fecf4b /libpod/oci.go
parent93765a99640940f59ce5827a6116ce5ccb1566f3 (diff)
downloadpodman-a03e040f0bb1d32645879b2c8bec7c5e1fe0561f.tar.gz
podman-a03e040f0bb1d32645879b2c8bec7c5e1fe0561f.tar.bz2
podman-a03e040f0bb1d32645879b2c8bec7c5e1fe0561f.zip
libpod/oci.go: Perf issue
Matt Heon and I found that a defer statement was costing podman run dearly. We dont think the defer function was working (nor needed) and was timing out as well. Removing this defer statement decreased podman runtime by 1.5s or more. Signed-off-by: baude <bbaude@redhat.com> Closes: #253 Approved by: baude
Diffstat (limited to 'libpod/oci.go')
-rw-r--r--libpod/oci.go3
1 files changed, 0 insertions, 3 deletions
diff --git a/libpod/oci.go b/libpod/oci.go
index c122071e3..155b23640 100644
--- a/libpod/oci.go
+++ b/libpod/oci.go
@@ -232,11 +232,8 @@ func (r *OCIRuntime) createContainer(ctr *Container, cgroupParent string) (err e
if err != nil {
logrus.Warnf("Failed to add conmon to cgroupfs sandbox cgroup: %v", err)
} else {
- // XXX: this defer does nothing as the cgroup can't be deleted cause
- // it contains the conmon pid in tasks
// we need to remove this defer and delete the cgroup once conmon exits
// maybe need a conmon monitor?
- defer control.Delete()
if err := control.Add(cgroups.Process{Pid: cmd.Process.Pid}); err != nil {
logrus.Warnf("Failed to add conmon to cgroupfs sandbox cgroup: %v", err)
}