linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrey Wagin <avagin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Andrew Vagin <avagin-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
Cc: "Michael Kerrisk (man-pages)"
	<mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Oleg Nesterov <oleg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Pavel Emelyanov <xemul-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>,
	linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	criu-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org,
	Cyrill Gorcunov
	<gorcunov-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>,
	Alexander Viro
	<viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org>,
	linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Andrew Morton
	<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
	"Paul E. McKenney"
	<paulmck-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>,
	Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
Subject: Re: [CRIU] [PATCH 2/3] signalfd: add ability to return siginfo in a raw format (v2)
Date: Mon, 21 Jan 2013 21:57:24 +0400	[thread overview]
Message-ID: <CANaxB-zR1daDmu3wxKMfw70Fv63=bSqUfjvibRG98RECKJQndw@mail.gmail.com> (raw)
In-Reply-To: <20130121154444.GA10849-yYYamFZzV1regbzhZkK2zA@public.gmane.org>

2013/1/21 Andrew Vagin <avagin-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>:
> On Sun, Jan 20, 2013 at 09:33:41PM +0100, Michael Kerrisk (man-pages) wrote:
>> Hi Oleg,
>>
>> On Sun, Jan 20, 2013 at 8:55 PM, Oleg Nesterov <oleg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
>> > On 01/20, Andrew Vagin wrote:
>> >>
>> >> > SFD_RAW
>> >> > SFD_SHARED_QUEUE -- reads will be from process-wide shared signal queue
>> >> > SFD_PER_THREAD_QUEUE --reads will be from per-thread signal queue
>> >>
>> >> I suggested this variant in the initial series, but then we decided to
>> >> avoid adding new flags.
>> >
>> > Yes, because SFD_SHARED/PRIVATE will add even more complications into this
>> > code. And outside of signalfd.c too. And nobody except c/r will ever use
>> > these features I guess.
>>
>> So, I must admit that I don't understand why adding SFD_SHARED and
>> SFD_PER_THREAD in signalfd() makes things more complicated than adding
>> the equivalents in pread(). But, I'll take your word for that, if
>> that's what you meant.
>
> You could look at the initial series.
> http://thread.gmane.org/gmane.linux.file-systems/70327
>
> In this case dequeue_signal should be changed for specifying a queue.
> signalfd_poll() should be fixed too. All this changes are not a big
> deal, but...
>
> If we want to have two flags for specifying queues, we will need one
> more flag SFD_PEEK, which will say, that signals should not be dequeued.
> Currently we get this information from offset too. If offset isn't zero,
> signals are not dequeued. With flags this sentence will look ugly.

I'm going to prepare a series with flags tomorrow.

Thanks.

>
>>
>> However, note that I did suggest that in the initial implementation
>> you might require that if SFD_SHARED_QUEUE or SFD_PER_THREAD_QUEUE is
>> specified in signalfd(), then SFD_RAW could be required as well.
>> Later, if someone wants to do the work, they could relax the
>> constraint, so as to allow signalfd() to be used to do per-queue
>> select even when reading siginfo (i.e., SFD_SHARED_QUEUE or
>> SFD_PER_THREAD_QUEUE specified but not SFD_RAW). Surely that is not
>> more complicated than the current implementation. And it allows for an
>> orthogonal expansion of the design that seems more natural and may one
>> day be useful.
>>
>> Cheers,
>>
>> Michael

  parent reply	other threads:[~2013-01-21 17:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-14 16:53 [PATCH 0/3] signalfd: a kernel interface for dumping/restoring pending signals (v3) Andrey Vagin
2013-01-14 16:53 ` [PATCH 1/3] signal: allow to send any siginfo to itself Andrey Vagin
2013-01-14 16:53 ` [PATCH 2/3] signalfd: add ability to return siginfo in a raw format (v2) Andrey Vagin
2013-01-16 20:35   ` Andrew Morton
2013-01-17 15:28     ` Andrew Vagin
     [not found]     ` <20130116123502.70af6b85.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2013-01-18 23:27       ` Michael Kerrisk (man-pages)
     [not found]         ` <CAKgNAkgHVB3=k_XOevobcMWuEqy2r75tdTc85ZYiD8rkn5OZKA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-01-19 10:50           ` Andrey Wagin
2013-01-19 23:27             ` Michael Kerrisk (man-pages)
     [not found]               ` <CAKgNAkjK9iWh_PuJ92A-MKW6Q6_B8DvTL5-fkxyULqx9ZoDPfg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-01-20 17:41                 ` [CRIU] " Andrew Vagin
     [not found]                   ` <20130120174153.GA5675-yYYamFZzV1regbzhZkK2zA@public.gmane.org>
2013-01-20 18:43                     ` Michael Kerrisk (man-pages)
2013-01-20 19:55                     ` Oleg Nesterov
2013-01-20 20:33                       ` Michael Kerrisk (man-pages)
     [not found]                         ` <CAKgNAkhcha9CkYHESqx72LyFB_xw7du=OU566Nk1LzHw+EnQQA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-01-21 15:44                           ` Andrew Vagin
     [not found]                             ` <20130121154444.GA10849-yYYamFZzV1regbzhZkK2zA@public.gmane.org>
2013-01-21 17:57                               ` Andrey Wagin [this message]
2013-01-14 16:53 ` [PATCH 3/3] signalfd: add ability to read siginfo-s without dequeuing signals (v4) Andrey Vagin
2013-01-16 16:00 ` [PATCH 0/3] signalfd: a kernel interface for dumping/restoring pending signals (v3) 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='CANaxB-zR1daDmu3wxKMfw70Fv63=bSqUfjvibRG98RECKJQndw@mail.gmail.com' \
    --to=avagin-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=avagin-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org \
    --cc=criu-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org \
    --cc=dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=gorcunov-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org \
    --cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=oleg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=paulmck-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
    --cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
    --cc=viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org \
    --cc=xemul-bzQdu9zFT3WakBO8gow8eQ@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 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).