linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: David Laight <David.Laight@ACULAB.COM>
Cc: 'Kevin Easton' <kevin@guarana.org>,
	Daniel Colascione <dancol@google.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-api@vger.kernel.org" <linux-api@vger.kernel.org>,
	"timmurray@google.com" <timmurray@google.com>,
	"primiano@google.com" <primiano@google.com>,
	"joelaf@google.com" <joelaf@google.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Andrew Morton <akpm@linux-foundation.org>,
	Mike Rapoport <rppt@linux.vnet.ibm.com>,
	Roman Gushchin <guro@fb.com>, Vlastimil Babka <vbabka@suse.cz>,
	"Dennis Zhou (Facebook)" <dennisszhou@gmail.com>,
	Prashant Dhamdhere <pdhamdhe@redhat.com>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	"Steven Rostedt (VMware)" <rostedt@goodmis.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH] Add /proc/pid_generation
Date: Mon, 26 Nov 2018 00:00:07 +0100	[thread overview]
Message-ID: <20181125230007.GC30242@amd> (raw)
In-Reply-To: <f00df51af0a4491fa7d86f9dc0c07bf6@AcuMS.aculab.com>

[-- Attachment #1: Type: text/plain, Size: 1328 bytes --]

On Fri 2018-11-23 11:14:17, David Laight wrote:
> From: Kevin Easton
> > Sent: 22 November 2018 11:20
> > 
> > On Wed, Nov 21, 2018 at 12:14:44PM -0800, Daniel Colascione wrote:
> > > This change adds a per-pid-namespace 64-bit generation number,
> > > incremented on PID rollover, and exposes it via a new proc file
> > > /proc/pid_generation. By examining this file before and after /proc
> > > enumeration, user code can detect the potential reuse of a PID and
> > > restart the task enumeration process, repeating until it gets a
> > > coherent snapshot.
> > 
> > I see downthread this patch has been withdrawn, but nonetheless I'm
> > still curious - does this actually solve the problem?
> > 
> > It seems to me that a PID could be reused within a scan even if the
> > generation number remains the same at the beginning and end of a scan:
> 
> Why not allocate a 48bit generation number to each 16bit pid?
> Then you have a 64bit 'extended-pid' that can be assumed to never be reused.
> Provided enough interfaces are enhanced to support 'extended-pid' values
> you'll never get reused values.

For the record, I really like this proposal.

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

      reply	other threads:[~2018-11-25 23:00 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-21 20:14 [PATCH] Add /proc/pid_generation Daniel Colascione
2018-11-21 20:31 ` Matthew Wilcox
2018-11-21 20:38   ` Daniel Colascione
2018-11-22  2:06     ` Matthew Wilcox
2018-11-25 22:55       ` Pavel Machek
2018-11-21 20:54 ` [PATCH v2] Add /proc/pid_gen Daniel Colascione
2018-11-21 22:12   ` Andrew Morton
2018-11-21 22:40     ` Daniel Colascione
2018-11-21 22:48       ` Jann Horn
2018-11-21 22:52         ` Daniel Colascione
2018-11-21 22:50       ` Andrew Morton
2018-11-21 23:21         ` Daniel Colascione
2018-11-21 23:35           ` Andy Lutomirski
2018-11-22  0:21             ` Daniel Colascione
2018-11-22 13:58             ` Cyrill Gorcunov
2018-11-22  0:22           ` Andrew Morton
2018-11-22  0:28             ` Daniel Colascione
2018-11-22  0:30               ` Daniel Colascione
2018-11-22 15:27                 ` Mathieu Desnoyers
2018-11-22  0:57               ` Andrew Morton
2018-11-22  1:08                 ` Daniel Colascione
2018-11-22  1:29                   ` Andrew Morton
2018-11-22  2:35                     ` Tim Murray
2018-11-22  5:30                       ` Daniel Colascione
2018-11-22 11:19 ` [PATCH] Add /proc/pid_generation Kevin Easton
2018-11-23 11:14   ` David Laight
2018-11-25 23:00     ` Pavel Machek [this message]

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=20181125230007.GC30242@amd \
    --to=pavel@ucw.cz \
    --cc=David.Laight@ACULAB.COM \
    --cc=akpm@linux-foundation.org \
    --cc=corbet@lwn.net \
    --cc=dancol@google.com \
    --cc=dennisszhou@gmail.com \
    --cc=ebiederm@xmission.com \
    --cc=guro@fb.com \
    --cc=joelaf@google.com \
    --cc=kevin@guarana.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=pdhamdhe@redhat.com \
    --cc=primiano@google.com \
    --cc=rostedt@goodmis.org \
    --cc=rppt@linux.vnet.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=timmurray@google.com \
    --cc=vbabka@suse.cz \
    /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).