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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 3 Feb 2022 13:27:17 -0800
From:   John Hubbard <jhubbard@...dia.com>
To:     Christoph Hellwig <hch@...radead.org>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Peter Xu <peterx@...hat.com>, Jason Gunthorpe <jgg@...pe.ca>,
        David Hildenbrand <david@...hat.com>,
        Lukas Bulwahn <lukas.bulwahn@...il.com>,
        Jan Kara <jack@...e.cz>,
        Claudio Imbrenda <imbrenda@...ux.ibm.com>,
        "Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
        Alex Williamson <alex.williamson@...hat.com>,
        Andrea Arcangeli <aarcange@...hat.com>,
        LKML <linux-kernel@...r.kernel.org>, linux-mm@...ck.org,
        Jason Gunthorpe <jgg@...dia.com>
Subject: Re: [PATCH v3 4/4] mm/gup: remove get_user_pages_locked()

On 2/3/22 06:01, Christoph Hellwig wrote:
> On Thu, Feb 03, 2022 at 01:32:32AM -0800, John Hubbard wrote:
>> There is only one caller of get_user_pages_locked(). The purpose of
>> get_user_pages_locked() is to allow for unlocking the mmap_lock when
>> reading a page from the disk during a page fault (hidden behind
>> VM_FAULT_RETRY). The idea is to reduce contention on the heavily-used
>> mmap_lock. (Thanks to Jan Kara for clearly pointing that out, and in
>> fact I've used some of his wording here.)
>>
>> However, it is unlikely for lookup_node() to take a page fault. With
>> that in mind, change over to calling get_user_pages_fast(). This
>> simplifies the code, runs a little faster in the expected case, and
>> allows removing get_user_pages_locked() entirely.
> 
> Maybe split the lookup_node changes into a separate patch, as that
> allows to document that change even better.

OK, I'll do that.


thanks,
-- 
John Hubbard
NVIDIA

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ