From: Oleg Nesterov <oleg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Pavel Emelyanov <xemul-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
Andrey Vagin <avagin-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
criu-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org,
linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Roland McGrath <roland-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
Andrew Morton
<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
"Paul E. McKenney"
<paulmck-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>,
David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
Dave Jones <davej-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
Linus Torvalds
<torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
Subject: Re: [PATCH] ptrace: add ability to retrieve signals without removing them from a queue
Date: Wed, 20 Feb 2013 23:37:03 +0100 [thread overview]
Message-ID: <20130220223703.GB16194@redhat.com> (raw)
In-Reply-To: <5123D6D6.7010904-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
On 02/19, Pavel Emelyanov wrote:
>
> On 02/19/2013 11:34 PM, Oleg Nesterov wrote:
> > But, given that every PEEK does list_for_each() until it finds the
> > necessary sequence number, I am wondering how this O(n**2) will work
> > if you want to dump 126065 signals ;)
>
> Isn't it the great reason for making the addr point to a structure, that
> would look like
>
> struct siginfo_peek_arg {
> unsigned flags; /* all bits but 0th, that selects between private/shared
> queues, should be zero */
> unsigned int off; /* from which siginfo to start */
> unsigned int nr; /* how may siginfos to take */
> };
I am fine either way, to me everything looks better than signalfd
hacks.
But if you meant "avoid n^2", this won't help? You can't do
copy_siginfo_to_user() under ->siglock, so you need to restart
list_for_each() anyway.
Oleg.
next prev parent reply other threads:[~2013-02-20 22:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-13 15:16 [PATCH] ptrace: add ability to retrieve signals without removing them from a queue Andrey Vagin
[not found] ` <1360768595-31943-1-git-send-email-avagin-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org>
2013-02-13 16:06 ` Oleg Nesterov
2013-02-15 18:44 ` Pedro Alves
[not found] ` <511E8223.6010506-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-02-15 19:43 ` Oleg Nesterov
[not found] ` <20130215194356.GA12413-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-02-15 19:53 ` Pedro Alves
2013-02-15 20:03 ` Pedro Alves
[not found] ` <511E9480.5070202-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-02-19 9:39 ` Andrey Wagin
2013-02-19 12:15 ` Michael Kerrisk (man-pages)
[not found] ` <CAKgNAkicAGEkvNFnSso__wK6QKao8jyDu5yuRmeyUOeaXLGChw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-02-19 17:53 ` Pavel Emelyanov
2013-02-19 19:34 ` Oleg Nesterov
[not found] ` <20130219193424.GA9606-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-02-19 19:47 ` Pavel Emelyanov
[not found] ` <5123D6D6.7010904-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2013-02-20 22:37 ` Oleg Nesterov [this message]
[not found] ` <20130220223703.GB16194-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-02-21 10:30 ` Pavel Emelyanov
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=20130220223703.GB16194@redhat.com \
--to=oleg-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=avagin-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org \
--cc=criu-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org \
--cc=davej-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=paulmck-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
--cc=roland-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@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).