From: Jan Stancek <jstancek@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] memcg/functional: check several times if the process is killed
Date: Tue, 24 May 2016 06:32:46 -0400 (EDT) [thread overview]
Message-ID: <812583643.272236.1464085966204.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20160524101528.GB10029@rei.lan>
----- Original Message -----
> From: "Cyril Hrubis" <chrubis@suse.cz>
> To: "Stanislav Kholmanskikh" <stanislav.kholmanskikh@oracle.com>
> Cc: "Jan Stancek" <jstancek@redhat.com>, "vasily isaenko" <vasily.isaenko@oracle.com>, ltp@lists.linux.it
> Sent: Tuesday, 24 May, 2016 12:15:28 PM
> Subject: Re: [LTP] [PATCH] memcg/functional: check several times if the process is killed
>
> Hi!
> > > We should better change this for something more robust. Given that the
> > > memgc_progcess does while (!flag_exit) sleep(1); in the main loop we may
> > > as well wait till the process gets into the sleep state.
> > >
> >
> > I don't understand why it's more robust. For example, a process can get
> > into the sleep state (interruptible sleep) due to a call to a syscall, no?
>
> Generally yes, but in this case it's unlikely that opening /dev/zero or
> calling sigaction() would block.
There's also some ld setup going on before that. Opening/mapping/reading
various config and .so files.
>
> > So maybe keep this sleep() as is?
>
> I'm Ok with that one as well. But we should rethink and fix it later.
My immediate idea was to let memcg_process open "/tmp/memcg_process_ready"
and shell script would monitor /proc/$pid/fd/ until sees that or hits timeout.
Regards,
Jan
next prev parent reply other threads:[~2016-05-24 10:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-19 14:55 [LTP] [PATCH] memcg/functional: check several times if the process is killed Stanislav Kholmanskikh
2016-05-23 16:02 ` Cyril Hrubis
2016-05-23 16:25 ` Stanislav Kholmanskikh
2016-05-23 16:39 ` Cyril Hrubis
2016-05-23 17:43 ` Stanislav Kholmanskikh
2016-05-24 8:52 ` [LTP] [PATCH V2] " Stanislav Kholmanskikh
2016-05-24 12:26 ` Cyril Hrubis
2016-05-24 9:02 ` [LTP] [PATCH] " Jan Stancek
2016-05-24 9:18 ` Cyril Hrubis
2016-05-24 10:04 ` Stanislav Kholmanskikh
2016-05-24 10:15 ` Cyril Hrubis
2016-05-24 10:32 ` Jan Stancek [this message]
2016-05-24 10:48 ` Cyril Hrubis
2016-05-30 14:50 ` Stanislav Kholmanskikh
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=812583643.272236.1464085966204.JavaMail.zimbra@redhat.com \
--to=jstancek@redhat.com \
--cc=ltp@lists.linux.it \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox