From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f200.google.com (mail-pf0-f200.google.com [209.85.192.200]) by kanga.kvack.org (Postfix) with ESMTP id 7449D6B0253 for ; Tue, 29 Nov 2016 00:10:27 -0500 (EST) Received: by mail-pf0-f200.google.com with SMTP id j128so243380038pfg.4 for ; Mon, 28 Nov 2016 21:10:27 -0800 (PST) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com. [148.163.156.1]) by mx.google.com with ESMTPS id u20si58221774pfd.147.2016.11.28.21.10.26 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Nov 2016 21:10:26 -0800 (PST) Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id uAT59DkH095527 for ; Tue, 29 Nov 2016 00:10:25 -0500 Received: from e23smtp07.au.ibm.com (e23smtp07.au.ibm.com [202.81.31.140]) by mx0a-001b2d01.pphosted.com with ESMTP id 271367rufq-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 29 Nov 2016 00:10:25 -0500 Received: from localhost by e23smtp07.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 29 Nov 2016 15:10:23 +1000 Received: from d23relay10.au.ibm.com (d23relay10.au.ibm.com [9.190.26.77]) by d23dlp02.au.ibm.com (Postfix) with ESMTP id 8CE4A2BB005B for ; Tue, 29 Nov 2016 16:10:20 +1100 (EST) Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay10.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id uAT5AKKJ48496802 for ; Tue, 29 Nov 2016 16:10:20 +1100 Received: from d23av01.au.ibm.com (localhost [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id uAT5AJBs007542 for ; Tue, 29 Nov 2016 16:10:20 +1100 Subject: Re: [PATCH 1/5] mm: migrate: Add mode parameter to support additional page copy routines. References: <20161122162530.2370-1-zi.yan@sent.com> <20161122162530.2370-2-zi.yan@sent.com> From: Anshuman Khandual Date: Tue, 29 Nov 2016 10:40:12 +0530 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Message-Id: <583D0DB4.5060201@linux.vnet.ibm.com> Sender: owner-linux-mm@kvack.org List-ID: To: Zi Yan , Balbir Singh 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 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 -- 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: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 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 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