Re: [RFC 05/11] mm: make the try_to_munlock void function

2017-03-07 Thread Minchan Kim
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

Re: [RFC 05/11] mm: make the try_to_munlock void function

2017-03-07 Thread Minchan Kim
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

Re: [RFC 05/11] mm: make the try_to_munlock void function

2017-03-07 Thread Kirill A. Shutemov
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,

Re: [RFC 05/11] mm: make the try_to_munlock void function

2017-03-07 Thread Kirill A. Shutemov
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,

Re: [RFC 05/11] mm: make the try_to_munlock void function

2017-03-07 Thread Anshuman Khandual
On 03/07/2017 12:20 PM, Minchan Kim wrote: > Hi Anshuman, > > On Mon, Mar 06, 2017 at 03:10:17PM +0530, Anshuman Khandual wrote: >> On 03/06/2017 07:39 AM, Minchan Kim wrote: >>> On Fri, Mar 03, 2017 at 05:13:54PM +0530, Anshuman Khandual wrote: On 03/02/2017 12:09 PM, Minchan Kim wrote:

Re: [RFC 05/11] mm: make the try_to_munlock void function

2017-03-07 Thread Anshuman Khandual
On 03/07/2017 12:20 PM, Minchan Kim wrote: > Hi Anshuman, > > On Mon, Mar 06, 2017 at 03:10:17PM +0530, Anshuman Khandual wrote: >> On 03/06/2017 07:39 AM, Minchan Kim wrote: >>> On Fri, Mar 03, 2017 at 05:13:54PM +0530, Anshuman Khandual wrote: On 03/02/2017 12:09 PM, Minchan Kim wrote:

Re: [RFC 05/11] mm: make the try_to_munlock void function

2017-03-07 Thread Minchan Kim
Hi Anshuman, On Mon, Mar 06, 2017 at 03:10:17PM +0530, Anshuman Khandual wrote: > On 03/06/2017 07:39 AM, Minchan Kim wrote: > > On Fri, Mar 03, 2017 at 05:13:54PM +0530, Anshuman Khandual wrote: > >> On 03/02/2017 12:09 PM, Minchan Kim wrote: > >>> try_to_munlock returns SWAP_MLOCK if the one of

Re: [RFC 05/11] mm: make the try_to_munlock void function

2017-03-07 Thread Minchan Kim
Hi Anshuman, On Mon, Mar 06, 2017 at 03:10:17PM +0530, Anshuman Khandual wrote: > On 03/06/2017 07:39 AM, Minchan Kim wrote: > > On Fri, Mar 03, 2017 at 05:13:54PM +0530, Anshuman Khandual wrote: > >> On 03/02/2017 12:09 PM, Minchan Kim wrote: > >>> try_to_munlock returns SWAP_MLOCK if the one of

Re: [RFC 05/11] mm: make the try_to_munlock void function

2017-03-06 Thread Anshuman Khandual
On 03/06/2017 07:39 AM, Minchan Kim wrote: > On Fri, Mar 03, 2017 at 05:13:54PM +0530, Anshuman Khandual wrote: >> On 03/02/2017 12:09 PM, 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

Re: [RFC 05/11] mm: make the try_to_munlock void function

2017-03-06 Thread Anshuman Khandual
On 03/06/2017 07:39 AM, Minchan Kim wrote: > On Fri, Mar 03, 2017 at 05:13:54PM +0530, Anshuman Khandual wrote: >> On 03/02/2017 12:09 PM, 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

Re: [RFC 05/11] mm: make the try_to_munlock void function

2017-03-05 Thread Minchan Kim
On Fri, Mar 03, 2017 at 05:13:54PM +0530, Anshuman Khandual wrote: > On 03/02/2017 12:09 PM, 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

Re: [RFC 05/11] mm: make the try_to_munlock void function

2017-03-05 Thread Minchan Kim
On Fri, Mar 03, 2017 at 05:13:54PM +0530, Anshuman Khandual wrote: > On 03/02/2017 12:09 PM, 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

Re: [RFC 05/11] mm: make the try_to_munlock void function

2017-03-03 Thread Anshuman Khandual
On 03/02/2017 12:09 PM, 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. Right. > > With that,

Re: [RFC 05/11] mm: make the try_to_munlock void function

2017-03-03 Thread Anshuman Khandual
On 03/02/2017 12:09 PM, 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. Right. > > With that,

[RFC 05/11] mm: make the try_to_munlock void function

2017-03-01 Thread Minchan Kim
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

[RFC 05/11] mm: make the try_to_munlock void function

2017-03-01 Thread Minchan Kim
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