public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Pavel Emelyanov <xemul@parallels.com>
Subject: Re: Q: On restoring terminal with hinted index
Date: Wed, 15 Aug 2012 09:16:10 -0700	[thread overview]
Message-ID: <502BCB4A.5050002@zytor.com> (raw)
In-Reply-To: <20120815152504.GG23657@moon>

On 08/15/2012 08:25 AM, Cyrill Gorcunov wrote:
> Hi Peter,
> 
> that happened that in a sake of restoring ptys after checkpoint
> we need to create them with predefined indices, as they were at
> moment of dumping. So we have two options -- 1) Open terminals
> in sequence until needed index reached 2) Use some other way to
> say the kernel that some index is preferred.
> 
> So I thought, would it be acceptible to provide such hint via
> sysctl, as in patch below (note I've not even compiled it yet,
> but would like to know your opinion early).
> 
> (Maybe even make it one shot, thus once ida_get_new_above called
>  the pty_next reset to zero).
> 

Pardon me while I vomit... an interaction between sysctl and open?  Talk
about a race condition from hell.  It is stateful, and not connected to
the filesystem instance that it is supposed to be affecting.  So no,
please don't.  I understand your objective but it really needs to be
something attached to the pts filesystem instance in question.

	-hpa

  reply	other threads:[~2012-08-15 16:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-15 15:25 Q: On restoring terminal with hinted index Cyrill Gorcunov
2012-08-15 16:16 ` H. Peter Anvin [this message]
2012-08-15 16:19   ` Cyrill Gorcunov

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=502BCB4A.5050002@zytor.com \
    --to=hpa@zytor.com \
    --cc=gorcunov@openvz.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xemul@parallels.com \
    /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