lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8354ba5b-d1ce-90c7-be76-328ab9321550@suse.cz>
Date:   Fri, 17 Jun 2022 09:57:06 +0200
From:   Vlastimil Babka <vbabka@...e.cz>
To:     Yu Zhao <yuzhao@...gle.com>
Cc:     Mel Gorman <mgorman@...hsingularity.net>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Nicolas Saenz Julienne <nsaenzju@...hat.com>,
        Marcelo Tosatti <mtosatti@...hat.com>,
        Michal Hocko <mhocko@...nel.org>,
        Hugh Dickins <hughd@...gle.com>,
        LKML <linux-kernel@...r.kernel.org>,
        Linux-MM <linux-mm@...ck.org>
Subject: Re: [PATCH 7/7] mm/page_alloc: Replace local_lock with normal
 spinlock

On 6/16/22 23:07, Yu Zhao wrote:
> On Thu, Jun 16, 2022 at 11:02 AM Vlastimil Babka <vbabka@...e.cz> wrote:
>>
>>
>> > @@ -3794,19 +3805,29 @@ static struct page *rmqueue_pcplist(struct zone *preferred_zone,
>> >       struct list_head *list;
>> >       struct page *page;
>> >       unsigned long flags;
>> > +     unsigned long __maybe_unused UP_flags;
>> >
>> > -     local_lock_irqsave(&pagesets.lock, flags);
>> > +     /*
>> > +      * spin_trylock_irqsave is not necessary right now as it'll only be
>> > +      * true when contending with a remote drain. It's in place as a
>> > +      * preparation step before converting pcp locking to spin_trylock
>> > +      * to protect against IRQ reentry.
>> > +      */
>> > +     pcp_trylock_prepare(UP_flags);
>> > +     pcp = pcp_spin_trylock_irqsave(zone->per_cpu_pageset, flags);
>> > +     if (!pcp)
>>
>> Besides the missing unpin Andrew fixed, I think also this is missing
>> pcp_trylock_finish(UP_flags); ?
> 
> spin_trylock only fails when trylock_finish is a NOP.

True, so it's not an active bug, but I would still add it, so it's not
confusing and depending on non-obvious details that might later change and
break the code.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ