lkml.org 
[lkml]   [2022]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm/page_alloc: replace local_lock with normal spinlock -fix -fix
On Fri, Jul 08, 2022 at 04:54:47PM +0200, Vlastimil Babka wrote:
> On 7/8/22 16:44, Mel Gorman wrote:
> > pcpu_spin_unlock and pcpu_spin_unlock_irqrestore both unlock
> > pcp->lock and then enable preemption. This lacks symmetry against
> > both the pcpu_spin helpers and differs from how local_unlock_* is
> > implemented. While this is harmless, it's unnecessary and it's generally
> > better to unwind locks and preemption state in the reverse order as
> > they were acquired.
>
> Hm I'm confused, it seems it's done in reverse order (which I agree with)
> before this -fix-fix, but not after it?
>
> before, pcpu_spin_lock() (and variants) do pcpu_task_pin() and then
> spin_lock() (or variant), and pcpu_spin_unlock() does spin_unlock() and then
> pcpu_task_unpin(). That seems symmetrical, i.e. reverse order to me? And
> seems to match what local_lock family does too.
>

You're not confused, I am. The patch and the changelog are outright brain
damage from excessive context switching and a sign that it's time for the
weekend to start.

Sorry for this absolute misfortune.

--
Mel Gorman
SUSE Labs

\
 
 \ /
  Last update: 2022-07-08 17:59    [W:0.055 / U:0.628 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site