libpod: avoid polling container status#3933
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: giuseppe The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Do we still need this, if we're doing the waiting for the file above? I'd just as soon drop the polling wait and convert entirely to WaitForFile()
There was a problem hiding this comment.
tests are failing as they get stuck in WaitForFile. I was just rewriting it to use both (in a select block). What do you think?
There was a problem hiding this comment.
Doesn't WaitForFile already do a poll alongside the inotify? I don't think we need to keep another one here. Might want to let you set the interval on the polling in WaitForFile though.
Failures are probably the file never appearing due to --rm - we'll need a timeout on this.
There was a problem hiding this comment.
fixed in the last version I've pushed
00064d0 to
64152a4
Compare
8367617 to
354b762
Compare
a387224 to
d96c3af
Compare
use the inotify backend to be notified on the container exit instead of polling continuosly the runtime. Polling the runtime slowns significantly down the podman execution time for short lived processes: $ time bin/podman run --rm -ti fedora true real 0m0.324s user 0m0.088s sys 0m0.064s from: $ time podman run --rm -ti fedora true real 0m4.199s user 0m5.339s sys 0m0.344s Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
d96c3af to
8e337af
Compare
|
LGTM on my end - nice work @giuseppe |
|
/lgtm |
use the inotify backend to be notified on the container exit instead
of polling continuosly the runtime. Polling the runtime slowns
significantly down the podman execution time for short lived
processes:
$ time bin/podman run --rm -ti fedora true
real 0m0.324s
user 0m0.088s
sys 0m0.064s
from:
$ time podman run --rm -ti fedora true
real 0m4.199s
user 0m5.339s
sys 0m0.344s
Signed-off-by: Giuseppe Scrivano gscrivan@redhat.com