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: <20190926110648.GM2751@suse.cz>
Date:   Thu, 26 Sep 2019 13:06:48 +0200
From:   David Sterba <dsterba@...e.cz>
To:     Yunfeng Ye <yeyunfeng@...wei.com>
Cc:     bvanassche@....org, bhelgaas@...gle.com,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        Alexander Duyck <alexander.h.duyck@...ux.intel.com>,
        sakari.ailus@...ux.intel.com,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        David Sterba <dsterba@...e.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] async: Let kfree() out of the critical area of the lock

On Thu, Sep 26, 2019 at 03:58:36PM +0800, Yunfeng Ye wrote:
> On 2019/9/25 23:20, Alexander Duyck wrote:
> > On Wed, 2019-09-25 at 20:52 +0800, Yunfeng Ye wrote:
> > It probably wouldn't hurt to update the patch description to mention that
> > async_schedule_node_domain does the allocation outside of the lock, then
> > takes the lock and does the list addition and entry_count increment inside
> > the critical section so this is just updating the code to match that it
> > seems.
> > 
> > Otherwise the change itself looks safe to me, though I am not sure there
> > is a performance gain to be had so this is mostly just a cosmetic patch.
> > 
> The async_lock is big global lock, I think it's good to put kfree() outside
> to keep the critical area as short as possible.

Agreed, kfree is not always cheap. We had patches in btrfs moving kfree
out of critical section(s) after causing softlockups due to increased lock
contention.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ