Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754148AbcK2FKf (ORCPT ); Tue, 29 Nov 2016 00:10:35 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:33735 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751308AbcK2FK1 (ORCPT ); Tue, 29 Nov 2016 00:10:27 -0500 Subject: Re: [PATCH 1/5] mm: migrate: Add mode parameter to support additional page copy routines. To: Zi Yan , Balbir Singh References: <20161122162530.2370-1-zi.yan@sent.com> <20161122162530.2370-2-zi.yan@sent.com> Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, minchan@kernel.org, vbabka@suse.cz, mgorman@techsingularity.net, kirill.shutemov@linux.intel.com, n-horiguchi@ah.jp.nec.com From: Anshuman Khandual Date: Tue, 29 Nov 2016 10:40:12 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16112905-0012-0000-0000-000001F10C12 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16112905-0013-0000-0000-0000068943BB Message-Id: <583D0DB4.5060201@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-11-29_01:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1611290086 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1439 Lines: 43 On 11/28/2016 08:43 PM, Zi Yan wrote: > On 24 Nov 2016, at 18:56, Balbir Singh wrote: > >> > On 23/11/16 03:25, Zi Yan wrote: >>> >> From: Zi Yan >>> >> >>> >> From: Zi Yan >>> >> >>> >> migrate_page_copy() and copy_huge_page() are affected. >>> >> >>> >> Signed-off-by: Zi Yan >>> >> Signed-off-by: Zi Yan >>> >> --- >>> >> 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 ? Right, should be an enum declaration for all kind of single page copy process. Now we have just two. We dont have to mention number of threads in the multi threaded one. MIGRATE_SINGLETHREAD MIGRATE_MULTITHREAD