From: Oleg Nesterov <oleg@redhat.com>
To: Roland McGrath <roland@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: [FOR REVIEW, PATCH 0/2] do_wait() cleanups.
Date: Wed, 6 May 2009 07:33:18 +0200 [thread overview]
Message-ID: <20090506053318.GA31977@redhat.com> (raw)
While this is not strictly necessary, I'd like to also cleanup do_wait/etc
before changing ptrace internals. Just because this code is still hardly
readable, imho. And we are going to complicate this code a little bit.
This trivial change nearly killed me. I didn't expect I will spent all
night doing this!!!
The patch is not tested, I am sending it for the early review, because
before I do the next changes I'd like to know your opinion: do you agree
with this patch "in general" ?
If yes, I'll send the next trivial cleanups on top:
- factor out getrusage() code
- factor out infop filling
- simplify retval/notask_error interaction
- perhaps some small simplifications in do_wait's callers
Naming. I agree in advance with any changes you suggest, and this is
another reason I am sending it early.
Also. This is completely off-topic wrt ptrace cleanups, but if we
change do_wait() now perhaps it makes sense to optimize do_wait()
in PIDTYPE_PID case. In this case we do not need to scan the lists,
we can inspect the task directly. This change should be simple, but
it will increase .text. Do you think it makes sense?
I do not plan any other cleanups before changing ptrace internals.
Oleg.
next reply other threads:[~2009-05-06 5:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-06 5:33 Oleg Nesterov [this message]
2009-05-06 20:27 ` [FOR REVIEW, PATCH 0/2] do_wait() cleanups Roland McGrath
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=20090506053318.GA31977@redhat.com \
--to=oleg@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=roland@redhat.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