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: <bb4fe1fe-dde0-b86b-740a-4b3dfa81d6f0@linux.ibm.com>
Date:   Tue, 4 Jun 2019 14:00:29 +0530
From:   "Aneesh Kumar K.V" <aneesh.kumar@...ux.ibm.com>
To:     Pingfan Liu <kernelfans@...il.com>, linux-mm@...ck.org
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Ira Weiny <ira.weiny@...el.com>,
        Dan Williams <dan.j.williams@...el.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Mike Rapoport <rppt@...ux.ibm.com>,
        John Hubbard <jhubbard@...dia.com>,
        Keith Busch <keith.busch@...el.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/gup: remove unnecessary check against CMA in
 __gup_longterm_locked()

On 6/4/19 12:56 PM, Pingfan Liu wrote:
> The PF_MEMALLOC_NOCMA is set by memalloc_nocma_save(), which is finally
> cast to ~_GFP_MOVABLE.  So __get_user_pages_locked() will get pages from
> non CMA area and pin them.  There is no need to
> check_and_migrate_cma_pages().


That is not completely correct. We can fault in that pages outside 
get_user_pages_longterm at which point those pages can get allocated 
from CMA region. memalloc_nocma_save() as added as an optimization to 
avoid unnecessary page migration.


-aneesh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ