[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 7 Jul 2017 12:33:49 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
David Laight <David.Laight@...LAB.COM>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"netfilter-devel@...r.kernel.org" <netfilter-devel@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"oleg@...hat.com" <oleg@...hat.com>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"mingo@...hat.com" <mingo@...hat.com>,
"dave@...olabs.net" <dave@...olabs.net>,
"manfred@...orfullife.com" <manfred@...orfullife.com>,
"tj@...nel.org" <tj@...nel.org>, "arnd@...db.de" <arnd@...db.de>,
"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
"will.deacon@....com" <will.deacon@....com>,
"stern@...land.harvard.edu" <stern@...land.harvard.edu>,
"parri.andrea@...il.com" <parri.andrea@...il.com>,
"torvalds@...ux-foundation.org" <torvalds@...ux-foundation.org>
Subject: Re: [PATCH v2 0/9] Remove spin_unlock_wait()
* Peter Zijlstra <peterz@...radead.org> wrote:
> You missed the one in do_exit(), which I thought was the original one.
Indeed, it's raw_spin_unlock_wait() which my git grep pattern missed.
But it's not the original spin_unlock_wait(): the pi_lock and priority inheritance
is a newfangled invention that Linus (rightfully) resisted for years.
The original spin_unlock_wait() was for the global scheduler_lock, long gone.
Here's the full history of the original spin_unlock_wait() usecase in the
do_exit() path, for the historically interested:
[1997/04] v2.1.36:
the spin_unlock_wait() primitive gets introduced as part of release()
[1998/08] v2.1.114:
the release() usecase gets converted to an open coded spin_lock()+unlock()
poll loop over scheduler_lock
[1999/05] v2.3.11pre3:
open coded loop is changed over to poll p->has_cpu
[1999/07] v2.3.12pre6:
->has_cpu loop poll loop is converted to a spin_lock()+unlock()
poll loop over runqueue_lock
[2000/06] 2.4.0-test6pre4:
combined open coded p->has_cpu poll loop is added back, in addition to the
lock()+unlock() loop
[2000/11] 2.4.0-test12pre4:
lock+unlock loop is changed from scheduler_lock to task_lock
[2001/11] v2.4.14.9:
->has_cpu gets renamed to ->cpus_runnable
[2001/12] v2.5.1.10:
poll loop is factored out from exit()'s release() function
to the scheduler's new wait_task_inactive() function
...
[2017/07] v4.12:
wait_task_inactive() is still alive and kicking. Its poll loop has
increased in complexity, but it still does not use spin_unlock_wait()
So it was always a mess, and we relatively early flipped from the clever
spin_unlock_wait() implementation to an open coded lock+unlock poll loop.
TL;DR: The original do_exit() usecase is gone, it does not use spin_unlock_wait(),
since 1998.
Thanks,
Ingo
Powered by blists - more mailing lists