From: Oleg Nesterov <oleg@redhat.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Jim Newsome <jnewsome@torproject.org>,
Andrew Morton <akpm@linux-foundation.org>,
Christian Brauner <christian@brauner.io>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5] do_wait: make PIDTYPE_PID case O(1) instead of O(n)
Date: Sat, 13 Mar 2021 18:25:35 +0100 [thread overview]
Message-ID: <20210313172534.GA3588@redhat.com> (raw)
In-Reply-To: <m1k0qcglol.fsf@fess.ebiederm.org>
On 03/12, Eric W. Biederman wrote:
>
> I am going to kibitz just a little bit more.
>
> When I looked at this a second time it became apparent that using
> pid_task twice should actually be faster as it removes a dependent load
> caused by thread_group_leader, and replaces it by accessing two adjacent
> pointers in the same cache line.
Heh, I think this code should be optimized for the reader in the first place ;)
But as I said I won't argue, readability is very subjective, I am fine with your
version too.
Oleg.
prev parent reply other threads:[~2021-03-13 17:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-12 17:38 [PATCH v5] do_wait: make PIDTYPE_PID case O(1) instead of O(n) Jim Newsome
2021-03-12 18:22 ` Andrew Morton
2021-03-12 18:39 ` Jim Newsome
2021-03-12 18:47 ` Andrew Morton
2021-03-13 2:42 ` Jim Newsome
2021-03-12 20:01 ` Jim Newsome
2021-03-12 20:29 ` Eric W. Biederman
2021-03-12 21:05 ` Jim Newsome
2021-03-12 21:25 ` Eric W. Biederman
2021-03-13 17:25 ` Oleg Nesterov [this message]
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=20210313172534.GA3588@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=christian@brauner.io \
--cc=ebiederm@xmission.com \
--cc=jnewsome@torproject.org \
--cc=linux-kernel@vger.kernel.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