All of lore.kernel.org
 help / color / mirror / Atom feed
From: sukadev-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org
To: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: Containers <containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org>,
	Oleg Nesterov <oleg-6lXkIZvqkOAvJsYlp49lxw@public.gmane.org>,
	Pavel Emelianov <xemul-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
Subject: Re: [PATCH 1/3] Signal semantics for /sbin/init
Date: Mon, 8 Oct 2007 08:42:00 -0700	[thread overview]
Message-ID: <20071008154200.GA10238@us.ibm.com> (raw)
In-Reply-To: <20071008143649.GA23774-6s5zFf/epYLPQpwDFJZrxKsjOiXwFzmk@public.gmane.org>

Serge E. Hallyn [serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org] wrote:
| Quoting sukadev-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org (sukadev-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org):
| > | > | > One solution I was thinking of was to possibly queue pending blocked
| > | > | > signals to a container init seperately and then requeue them on the
| > | > | > normal queue when signals are unblocked. Its definitely not an easier
| > | > | > solution, but might be less intrusive than the "signal from parent ns
| > | > | > flag" solution.
| > 
| > Hmm.  Stumbled upon an issue while coding this up.
| > 
| > For real time signals, is the order in which signals are delivered
| > important ?
| 
| A very quick, inadequate google search suggests that while order is
| important,  the order in which they should be delivered is in increasing
| signal number.  So that should be easy enough to maintain with this
| type of patch, right?

Yes. I could stick all the signals to the end of the queue and the
existing code should pick them up in proper order.

Thanks,

Suka

| 
| -serge
| 
| > If so, the above solution won't work, because when requeing
| > signals from pid namespace to the task, we may lose the order of signals.
| > 
| > i.e:
| > 	- signal sig1 is blocked.
| > 
| > 	- sig1 is posted and queued on the ns->cinit_blocked_pending queue
| > 
| > 	- just as we enter sigprocmask() to unblock sig1, if sig2 is
| > 	  posted, we queue sig2 on task->pending queue since sig2 is not
| > 	  blocked.
| > 
| > 	- when we actually unblock sig1, if we requeue ns->cinit_blocked_pending
| > 	  signals (i.e sig1) after sig2 we end up reversing the order of the
| > 	  signals sig1 and sig2.
| > 
| > 	  if we requeue the ns-> signals before sig2 and another sig1
| > 	  was received after the sig2 and just before the unblock, we
| > 	  again lose the order.
| > 
| > The order of signals is not important to legacy signals (< SIGRTMIN) but is 
| > probably an issue for signals SIGRTMIN..SIGRTMAX.

  parent reply	other threads:[~2007-10-08 15:42 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-11  4:10 [PATCH 1/3] Signal semantics for /sbin/init sukadev-r/Jw6+rmf7HQT0dZR+AlfA
     [not found] ` <20070911041030.GA1264-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2007-09-11 11:19   ` Oleg Nesterov
     [not found]     ` <20070911111928.GA123-6lXkIZvqkOAvJsYlp49lxw@public.gmane.org>
2007-09-13 15:40       ` Cedric Le Goater
     [not found]         ` <46E959EB.2070207-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2007-09-13 16:58           ` Oleg Nesterov
     [not found]             ` <20070913165820.GA3465-6lXkIZvqkOAvJsYlp49lxw@public.gmane.org>
2007-09-14  3:00               ` sukadev-r/Jw6+rmf7HQT0dZR+AlfA
     [not found]                 ` <20070914030053.GA21242-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2007-09-17 15:21                   ` Oleg Nesterov
     [not found]                     ` <20070917152122.GA861-6lXkIZvqkOAvJsYlp49lxw@public.gmane.org>
2007-09-18 19:00                       ` sukadev-r/Jw6+rmf7HQT0dZR+AlfA
     [not found]                         ` <20070918190052.GA14030-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2007-09-27  3:04                           ` sukadev-r/Jw6+rmf7HQT0dZR+AlfA
     [not found]                             ` <20070927030453.GA24451-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2007-09-28 10:38                               ` Oleg Nesterov
2007-10-01 17:00                           ` Serge E. Hallyn
     [not found]                             ` <20071001170035.GA10939-6s5zFf/epYLPQpwDFJZrxKsjOiXwFzmk@public.gmane.org>
2007-10-01 17:47                               ` sukadev-r/Jw6+rmf7HQT0dZR+AlfA
     [not found]                                 ` <20071001174720.GB28100-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2007-10-01 18:08                                   ` Serge E. Hallyn
     [not found]                                     ` <20071001180849.GA21343-6s5zFf/epYLPQpwDFJZrxKsjOiXwFzmk@public.gmane.org>
2007-10-05  4:30                                       ` sukadev-r/Jw6+rmf7HQT0dZR+AlfA
     [not found]                                         ` <20071005043030.GA27787-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2007-10-08 14:36                                           ` Serge E. Hallyn
     [not found]                                             ` <20071008143649.GA23774-6s5zFf/epYLPQpwDFJZrxKsjOiXwFzmk@public.gmane.org>
2007-10-08 15:42                                               ` sukadev-r/Jw6+rmf7HQT0dZR+AlfA [this message]
2007-09-14 10:16               ` [Devel] " Daniel Pittman
     [not found]                 ` <87myvpo8le.fsf-kiwxAyAbAnkGAYDEi5AF0l6hYfS7NtTn@public.gmane.org>
2007-09-17 15:24                   ` Oleg Nesterov
     [not found]                     ` <20070917152411.GB861-6lXkIZvqkOAvJsYlp49lxw@public.gmane.org>
2007-09-17 23:20                       ` Daniel Pittman
  -- strict thread matches above, loose matches on Subject: below --
2007-08-31 20:29 sukadev-r/Jw6+rmf7HQT0dZR+AlfA
     [not found] ` <20070831202949.GA3268-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2007-09-01 11:02   ` Oleg Nesterov
     [not found]     ` <20070901110221.GC191-6lXkIZvqkOAvJsYlp49lxw@public.gmane.org>
2007-09-03 15:56       ` sukadev-r/Jw6+rmf7HQT0dZR+AlfA
     [not found]         ` <20070903155609.GA2793-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2007-09-03 16:45           ` Oleg Nesterov

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=20071008154200.GA10238@us.ibm.com \
    --to=sukadev-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
    --cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
    --cc=oleg-6lXkIZvqkOAvJsYlp49lxw@public.gmane.org \
    --cc=serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
    --cc=xemul-GEFAQzZX7r8dnm+yROfE0A@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.