linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roman Gushchin <guro@fb.com>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] proc, coredump: add CoreDumping flag to /proc/pid/status
Date: Wed, 13 Sep 2017 16:07:22 -0700	[thread overview]
Message-ID: <20170913230722.GA2977@castle> (raw)
In-Reply-To: <20170913224643.GA1741@avx2>

On Thu, Sep 14, 2017 at 01:46:43AM +0300, Alexey Dobriyan wrote:
> On Wed, Sep 13, 2017 at 03:21:59PM -0700, Roman Gushchin wrote:
> > On Thu, Sep 14, 2017 at 01:15:26AM +0300, Alexey Dobriyan wrote:
> > > > To provide an ability to detect if a process is in the state of
> > > > being coreduped, we can expose a boolean CoreDumping flag
> > > > in /proc/pid/status.
> > > 
> > > Or add "State: C" ?
> > 
> > A program in such state can also sleep and run, so it's not
> > a state in terms of process states.
> 
> Well, maybe something will break from seeing unknown process state.
> 
> Regardless, symlink /proc/$PID/coredump pointing to either "0" or "1"
> is faster than open+read+parse+close.

Performance doesn't really matter in this case: nobody should check
this flag often. An expected usecase is described above: check the flag
once before killing the process by timeout.
So, it doesn't look deserving a separate entity in procfs.

  reply	other threads:[~2017-09-13 23:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-13 22:15 [RFC] proc, coredump: add CoreDumping flag to /proc/pid/status Alexey Dobriyan
2017-09-13 22:21 ` Roman Gushchin
2017-09-13 22:46   ` Alexey Dobriyan
2017-09-13 23:07     ` Roman Gushchin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-09-07 11:17 Roman Gushchin
2017-09-13 22:05 ` Roman Gushchin
2017-09-14 22:44 ` Roman Gushchin

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=20170913230722.GA2977@castle \
    --to=guro@fb.com \
    --cc=adobriyan@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).