Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1594877
| From | Minchan Kim <minchan@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC 05/11] mm: make the try_to_munlock void function |
| Date | 2017-03-08 07:50 +0100 |
| Message-ID | <tiDA6-2DR-9@gated-at.bofh.it> (permalink) |
| References | <tgtbP-7hM-5@gated-at.bofh.it> <tgtbQ-7hM-33@gated-at.bofh.it> <tipdM-11m-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Mar 07, 2017 at 06:17:47PM +0300, Kirill A. Shutemov wrote: > On Thu, Mar 02, 2017 at 03:39:19PM +0900, Minchan Kim wrote: > > try_to_munlock returns SWAP_MLOCK if the one of VMAs mapped > > the page has VM_LOCKED flag. In that time, VM set PG_mlocked to > > the page if the page is not pte-mapped THP which cannot be > > mlocked, either. > > > > With that, __munlock_isolated_page can use PageMlocked to check > > whether try_to_munlock is successful or not without relying on > > try_to_munlock's retval. It helps to make ttu/ttuo simple with > > upcoming patches. > > I *think* you're correct, but it took time to wrap my head around. > We basically rely on try_to_munlock() never caller for PTE-mapped THP. > And we don't at the moment. > > It worth adding something like > > VM_BUG_ON_PAGE(PageCompound(page) && PageDoubleMap(page), page); > > into try_to_munlock(). Agree. > > Otherwise looks good to me. > > Will free adding my Acked-by once this nit is addressed. Thanks for the review this part, Kirill! > > -- > Kirill A. Shutemov > > -- > To unsubscribe, send a message with 'unsubscribe linux-mm' in > the body to majordomo@kvack.org. For more info on Linux MM, > see: http://www.linux-mm.org/ . > Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC 00/11] make try_to_unmap simple Minchan Kim <minchan@kernel.org> - 2017-03-02 08:20 +0100
[RFC 01/11] mm: use SWAP_SUCCESS instead of 0 Minchan Kim <minchan@kernel.org> - 2017-03-02 08:20 +0100
Re: [RFC 01/11] mm: use SWAP_SUCCESS instead of 0 Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2017-03-02 15:30 +0100
Re: [RFC 01/11] mm: use SWAP_SUCCESS instead of 0 Minchan Kim <minchan@kernel.org> - 2017-03-03 04:20 +0100
Re: [RFC 01/11] mm: use SWAP_SUCCESS instead of 0 Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2017-03-06 10:10 +0100
Re: [RFC 01/11] mm: use SWAP_SUCCESS instead of 0 "Kirill A. Shutemov" <kirill@shutemov.name> - 2017-03-07 16:00 +0100
Re: [RFC 01/11] mm: use SWAP_SUCCESS instead of 0 Minchan Kim <minchan@kernel.org> - 2017-03-08 07:50 +0100
[RFC 09/11] mm: make rmap_walk void function Minchan Kim <minchan@kernel.org> - 2017-03-02 08:20 +0100
[RFC 08/11] mm: make ttu's return boolean Minchan Kim <minchan@kernel.org> - 2017-03-02 08:20 +0100
Re: [RFC 08/11] mm: make ttu's return boolean John Hubbard <jhubbard@nvidia.com> - 2017-03-08 09:50 +0100
Re: [RFC 08/11] mm: make ttu's return boolean Minchan Kim <minchan@kernel.org> - 2017-03-09 07:40 +0100
Re: [RFC 08/11] mm: make ttu's return boolean John Hubbard <jhubbard@nvidia.com> - 2017-03-09 07:50 +0100
[RFC 06/11] mm: remove SWAP_MLOCK in ttu Minchan Kim <minchan@kernel.org> - 2017-03-02 08:20 +0100
Re: [RFC 06/11] mm: remove SWAP_MLOCK in ttu Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2017-03-03 15:20 +0100
Re: [RFC 06/11] mm: remove SWAP_MLOCK in ttu Minchan Kim <minchan@kernel.org> - 2017-03-06 03:20 +0100
Re: [RFC 06/11] mm: remove SWAP_MLOCK in ttu "Kirill A. Shutemov" <kirill@shutemov.name> - 2017-03-07 19:30 +0100
Re: [RFC 06/11] mm: remove SWAP_MLOCK in ttu Minchan Kim <minchan@kernel.org> - 2017-03-08 08:00 +0100
[RFC 04/11] mm: remove SWAP_MLOCK check for SWAP_SUCCESS in ttu Minchan Kim <minchan@kernel.org> - 2017-03-02 08:20 +0100
Re: [RFC 04/11] mm: remove SWAP_MLOCK check for SWAP_SUCCESS in ttu Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2017-03-02 18:40 +0100
Re: [RFC 04/11] mm: remove SWAP_MLOCK check for SWAP_SUCCESS in ttu Minchan Kim <minchan@kernel.org> - 2017-03-03 05:30 +0100
Re: [RFC 04/11] mm: remove SWAP_MLOCK check for SWAP_SUCCESS in ttu "Kirill A. Shutemov" <kirill@shutemov.name> - 2017-03-07 15:30 +0100
Re: [RFC 04/11] mm: remove SWAP_MLOCK check for SWAP_SUCCESS in ttu Minchan Kim <minchan@kernel.org> - 2017-03-08 07:50 +0100
[RFC 07/11] mm: remove SWAP_AGAIN in ttu Minchan Kim <minchan@kernel.org> - 2017-03-02 08:20 +0100
Re: [RFC 07/11] mm: remove SWAP_AGAIN in ttu Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2017-03-03 17:20 +0100
Re: [RFC 07/11] mm: remove SWAP_AGAIN in ttu Minchan Kim <minchan@kernel.org> - 2017-03-06 03:40 +0100
[RFC 02/11] mm: remove unncessary ret in page_referenced Minchan Kim <minchan@kernel.org> - 2017-03-02 08:20 +0100
Re: [RFC 02/11] mm: remove unncessary ret in page_referenced Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2017-03-02 19:20 +0100
Re: [RFC 02/11] mm: remove unncessary ret in page_referenced Minchan Kim <minchan@kernel.org> - 2017-03-03 04:50 +0100
Re: [RFC 02/11] mm: remove unncessary ret in page_referenced "Kirill A. Shutemov" <kirill@shutemov.name> - 2017-03-07 15:40 +0100
[RFC 05/11] mm: make the try_to_munlock void function Minchan Kim <minchan@kernel.org> - 2017-03-02 08:20 +0100
Re: [RFC 05/11] mm: make the try_to_munlock void function Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2017-03-03 12:50 +0100
Re: [RFC 05/11] mm: make the try_to_munlock void function Minchan Kim <minchan@kernel.org> - 2017-03-06 03:10 +0100
Re: [RFC 05/11] mm: make the try_to_munlock void function Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2017-03-06 13:20 +0100
Re: [RFC 05/11] mm: make the try_to_munlock void function Minchan Kim <minchan@kernel.org> - 2017-03-07 09:30 +0100
Re: [RFC 05/11] mm: make the try_to_munlock void function Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2017-03-07 15:50 +0100
Re: [RFC 05/11] mm: make the try_to_munlock void function "Kirill A. Shutemov" <kirill@shutemov.name> - 2017-03-07 16:30 +0100
Re: [RFC 05/11] mm: make the try_to_munlock void function Minchan Kim <minchan@kernel.org> - 2017-03-08 07:50 +0100
Re: [RFC 00/11] make try_to_unmap simple Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2017-03-02 15:30 +0100
Re: [RFC 00/11] make try_to_unmap simple Minchan Kim <minchan@kernel.org> - 2017-03-03 03:50 +0100
Re: [RFC 00/11] make try_to_unmap simple Anshuman Khandual <khandual@linux.vnet.ibm.com> - 2017-03-03 10:10 +0100
csiph-web