[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210313172534.GA3588@redhat.com>
Date: Sat, 13 Mar 2021 18:25:35 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: "Eric W. Biederman" <ebiederm@...ssion.com>
Cc: Jim Newsome <jnewsome@...project.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Christian Brauner <christian@...uner.io>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5] do_wait: make PIDTYPE_PID case O(1) instead of O(n)
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.
Powered by blists - more mailing lists