[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANaxB-y_=267DABXjBdxjM=unt34mTnC8UQ64on7dHezta31gQ@mail.gmail.com>
Date: Mon, 25 Feb 2013 14:46:36 +0400
From: Andrey Wagin <avagin@...il.com>
To: Pavel Emelyanov <xemul@...allels.com>
Cc: linux-kernel@...r.kernel.org, criu@...nvz.org,
linux-api@...r.kernel.org, Roland McGrath <roland@...hat.com>,
Oleg Nesterov <oleg@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
David Howells <dhowells@...hat.com>,
Dave Jones <davej@...hat.com>,
"Michael Kerrisk (man-pages)" <mtk.manpages@...il.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Pedro Alves <palves@...hat.com>
Subject: Re: [PATCH] ptrace: add ability to retrieve signals without removing
from a queue (v2)
2013/2/25 Pavel Emelyanov <xemul@...allels.com>:
>> + for (i = 0; i < arg.nr; i++) {
>> + off = arg.off + i;
>> +
>> + spin_lock_irq(&child->sighand->siglock);
>> + list_for_each_entry(q, &pending->list, list) {
>> + if (!off--) {
>> + copy_siginfo(&info, &q->info);
>> + break;
>> + }
>> + }
>> + spin_unlock_irq(&child->sighand->siglock);
>
> What's the point of arg.nr if you for every single siginfo drop the lock
> and perform linear search anyway?
arg.nr may be useful, if we will decide to optimize this part in a
future. Currently the problem with complexity of finding a signal in a
queue is true not only for this code. It exists for delivering
real-time signals as well. Probably in a future this problem will be
fixed for both cases by the same way.
Thanks,
Andrew
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists