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: <B5823455-07C1-46A8-8F05-A109E9935A20@cs.rutgers.edu>
Date:   Mon, 28 Nov 2016 10:13:48 -0500
From:   Zi Yan <zi.yan@...rutgers.edu>
To:     Balbir Singh <bsingharora@...il.com>
CC:     <linux-kernel@...r.kernel.org>, <linux-mm@...ck.org>,
        <akpm@...ux-foundation.org>, <minchan@...nel.org>,
        <vbabka@...e.cz>, <mgorman@...hsingularity.net>,
        <kirill.shutemov@...ux.intel.com>, <n-horiguchi@...jp.nec.com>,
        <khandual@...ux.vnet.ibm.com>
Subject: Re: [PATCH 1/5] mm: migrate: Add mode parameter to support additional
 page copy routines.

On 24 Nov 2016, at 18:56, Balbir Singh wrote:

> On 23/11/16 03:25, Zi Yan wrote:
>> From: Zi Yan <zi.yan@...rutgers.edu>
>>
>> From: Zi Yan <ziy@...dia.com>
>>
>> migrate_page_copy() and copy_huge_page() are affected.
>>
>> Signed-off-by: Zi Yan <ziy@...dia.com>
>> Signed-off-by: Zi Yan <zi.yan@...rutgers.edu>
>> ---
>>  fs/aio.c                |  2 +-
>>  fs/hugetlbfs/inode.c    |  2 +-
>>  fs/ubifs/file.c         |  2 +-
>>  include/linux/migrate.h |  6 ++++--
>>  mm/migrate.c            | 14 ++++++++------
>>  5 files changed, 15 insertions(+), 11 deletions(-)
>>
>> diff --git a/fs/aio.c b/fs/aio.c
>> index 428484f..a67c764 100644
>> --- a/fs/aio.c
>> +++ b/fs/aio.c
>> @@ -418,7 +418,7 @@ static int aio_migratepage(struct address_space *mapping, struct page *new,
>>  	 * events from being lost.
>>  	 */
>>  	spin_lock_irqsave(&ctx->completion_lock, flags);
>> -	migrate_page_copy(new, old);
>> +	migrate_page_copy(new, old, 0);
>
> Can we have a useful enum instead of 0, its harder to read and understand
> 0

How about MIGRATE_SINGLETHREAD = 0 ?


>>  	BUG_ON(ctx->ring_pages[idx] != old);
>>  	ctx->ring_pages[idx] = new;
>>  	spin_unlock_irqrestore(&ctx->completion_lock, flags);
>> diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
>> index 4fb7b10..a17bfef 100644
>> --- a/fs/hugetlbfs/inode.c
>> +++ b/fs/hugetlbfs/inode.c
>> @@ -850,7 +850,7 @@ static int hugetlbfs_migrate_page(struct address_space *mapping,
>>  	rc = migrate_huge_page_move_mapping(mapping, newpage, page);
>>  	if (rc != MIGRATEPAGE_SUCCESS)
>>  		return rc;
>> -	migrate_page_copy(newpage, page);
>> +	migrate_page_copy(newpage, page, 0);
>
> Ditto
>
>>
>>  	return MIGRATEPAGE_SUCCESS;
>>  }
>> diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c
>> index b4fbeef..bf54e32 100644
>> --- a/fs/ubifs/file.c
>> +++ b/fs/ubifs/file.c
>> @@ -1468,7 +1468,7 @@ static int ubifs_migrate_page(struct address_space *mapping,
>>  		SetPagePrivate(newpage);
>>  	}
>>
>> -	migrate_page_copy(newpage, page);
>> +	migrate_page_copy(newpage, page, 0);
>
> Here as well
>
>
> Balbir Singh.


--
Best Regards
Yan Zi

Download attachment "signature.asc" of type "application/pgp-signature" (497 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ