All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anshuman Khandual <khandual@linux.vnet.ibm.com>
To: Zi Yan <zi.yan@sent.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Cc: akpm@linux-foundation.org, minchan@kernel.org, vbabka@suse.cz,
	mgorman@techsingularity.net, kirill.shutemov@linux.intel.com,
	n-horiguchi@ah.jp.nec.com, Zi Yan <zi.yan@cs.rutgers.edu>,
	Zi Yan <ziy@nvidia.com>
Subject: Re: [PATCH 5/5] mm: migrate: Add vm.accel_page_copy in sysfs to control whether to use multi-threaded to accelerate page copy.
Date: Thu, 24 Nov 2016 15:39:12 +0530	[thread overview]
Message-ID: <5836BC48.1080705@linux.vnet.ibm.com> (raw)
In-Reply-To: <20161122162530.2370-6-zi.yan@sent.com>

On 11/22/2016 09:55 PM, Zi Yan wrote:
> From: Zi Yan <zi.yan@cs.rutgers.edu>
> 
> From: Zi Yan <ziy@nvidia.com>
> 
> Since base page migration did not gain any speedup from
> multi-threaded methods, we only accelerate the huge page case.
> 
> Signed-off-by: Zi Yan <ziy@nvidia.com>
> Signed-off-by: Zi Yan <zi.yan@cs.rutgers.edu>
> ---
>  kernel/sysctl.c | 11 +++++++++++
>  mm/migrate.c    |  6 ++++++
>  2 files changed, 17 insertions(+)
> 
> diff --git a/kernel/sysctl.c b/kernel/sysctl.c
> index d54ce12..6c79444 100644
> --- a/kernel/sysctl.c
> +++ b/kernel/sysctl.c
> @@ -98,6 +98,8 @@
>  #if defined(CONFIG_SYSCTL)
> 
> 
> +extern int accel_page_copy;

Hmm, accel_mthread_copy because this is achieved by a multi threaded
copy mechanism.

> +
>  /* External variables not in a header file. */
>  extern int suid_dumpable;
>  #ifdef CONFIG_COREDUMP
> @@ -1361,6 +1363,15 @@ static struct ctl_table vm_table[] = {
>  		.proc_handler   = &hugetlb_mempolicy_sysctl_handler,
>  	},
>  #endif
> +	{
> +		.procname	= "accel_page_copy",
> +		.data		= &accel_page_copy,
> +		.maxlen		= sizeof(accel_page_copy),
> +		.mode		= 0644,
> +		.proc_handler	= proc_dointvec,
> +		.extra1		= &zero,
> +		.extra2		= &one,
> +	},
>  	 {
>  		.procname	= "hugetlb_shm_group",
>  		.data		= &sysctl_hugetlb_shm_group,
> diff --git a/mm/migrate.c b/mm/migrate.c
> index 244ece6..e64b490 100644
> --- a/mm/migrate.c
> +++ b/mm/migrate.c
> @@ -48,6 +48,8 @@
> 
>  #include "internal.h"
> 
> +int accel_page_copy = 1;
> +

So its enabled by default.

>  /*
>   * migrate_prep() needs to be called before we start compiling a list of pages
>   * to be migrated using isolate_lru_page(). If scheduling work on other CPUs is
> @@ -651,6 +653,10 @@ static void copy_huge_page(struct page *dst, struct page *src,
>  		nr_pages = hpage_nr_pages(src);
>  	}
> 
> +	/* Try to accelerate page migration if it is not specified in mode  */
> +	if (accel_page_copy)
> +		mode |= MIGRATE_MT;

So even if none of the system calls requested for a multi threaded copy,
this setting will override every thing and make it multi threaded.

--
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>

WARNING: multiple messages have this Message-ID (diff)
From: Anshuman Khandual <khandual@linux.vnet.ibm.com>
To: Zi Yan <zi.yan@sent.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Cc: akpm@linux-foundation.org, minchan@kernel.org, vbabka@suse.cz,
	mgorman@techsingularity.net, kirill.shutemov@linux.intel.com,
	n-horiguchi@ah.jp.nec.com, Zi Yan <zi.yan@cs.rutgers.edu>,
	Zi Yan <ziy@nvidia.com>
Subject: Re: [PATCH 5/5] mm: migrate: Add vm.accel_page_copy in sysfs to control whether to use multi-threaded to accelerate page copy.
Date: Thu, 24 Nov 2016 15:39:12 +0530	[thread overview]
Message-ID: <5836BC48.1080705@linux.vnet.ibm.com> (raw)
In-Reply-To: <20161122162530.2370-6-zi.yan@sent.com>

On 11/22/2016 09:55 PM, Zi Yan wrote:
> From: Zi Yan <zi.yan@cs.rutgers.edu>
> 
> From: Zi Yan <ziy@nvidia.com>
> 
> Since base page migration did not gain any speedup from
> multi-threaded methods, we only accelerate the huge page case.
> 
> Signed-off-by: Zi Yan <ziy@nvidia.com>
> Signed-off-by: Zi Yan <zi.yan@cs.rutgers.edu>
> ---
>  kernel/sysctl.c | 11 +++++++++++
>  mm/migrate.c    |  6 ++++++
>  2 files changed, 17 insertions(+)
> 
> diff --git a/kernel/sysctl.c b/kernel/sysctl.c
> index d54ce12..6c79444 100644
> --- a/kernel/sysctl.c
> +++ b/kernel/sysctl.c
> @@ -98,6 +98,8 @@
>  #if defined(CONFIG_SYSCTL)
> 
> 
> +extern int accel_page_copy;

Hmm, accel_mthread_copy because this is achieved by a multi threaded
copy mechanism.

> +
>  /* External variables not in a header file. */
>  extern int suid_dumpable;
>  #ifdef CONFIG_COREDUMP
> @@ -1361,6 +1363,15 @@ static struct ctl_table vm_table[] = {
>  		.proc_handler   = &hugetlb_mempolicy_sysctl_handler,
>  	},
>  #endif
> +	{
> +		.procname	= "accel_page_copy",
> +		.data		= &accel_page_copy,
> +		.maxlen		= sizeof(accel_page_copy),
> +		.mode		= 0644,
> +		.proc_handler	= proc_dointvec,
> +		.extra1		= &zero,
> +		.extra2		= &one,
> +	},
>  	 {
>  		.procname	= "hugetlb_shm_group",
>  		.data		= &sysctl_hugetlb_shm_group,
> diff --git a/mm/migrate.c b/mm/migrate.c
> index 244ece6..e64b490 100644
> --- a/mm/migrate.c
> +++ b/mm/migrate.c
> @@ -48,6 +48,8 @@
> 
>  #include "internal.h"
> 
> +int accel_page_copy = 1;
> +

So its enabled by default.

>  /*
>   * migrate_prep() needs to be called before we start compiling a list of pages
>   * to be migrated using isolate_lru_page(). If scheduling work on other CPUs is
> @@ -651,6 +653,10 @@ static void copy_huge_page(struct page *dst, struct page *src,
>  		nr_pages = hpage_nr_pages(src);
>  	}
> 
> +	/* Try to accelerate page migration if it is not specified in mode  */
> +	if (accel_page_copy)
> +		mode |= MIGRATE_MT;

So even if none of the system calls requested for a multi threaded copy,
this setting will override every thing and make it multi threaded.

  reply	other threads:[~2016-11-24 10:09 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-22 16:25 [PATCH 0/5] Parallel hugepage migration optimization Zi Yan
2016-11-22 16:25 ` Zi Yan
2016-11-22 16:25 ` [PATCH 1/5] mm: migrate: Add mode parameter to support additional page copy routines Zi Yan
2016-11-22 16:25   ` Zi Yan
2016-11-22 19:56   ` kbuild test robot
2016-11-22 19:56     ` kbuild test robot
2016-11-24  6:38     ` Anshuman Khandual
2016-11-24  6:38       ` Anshuman Khandual
2016-11-24  6:50   ` Anshuman Khandual
2016-11-24  6:50     ` Anshuman Khandual
2016-11-24 23:56   ` Balbir Singh
2016-11-24 23:56     ` Balbir Singh
2016-11-28 15:13     ` Zi Yan
2016-11-28 15:13       ` Zi Yan
2016-11-29  5:10       ` Anshuman Khandual
2016-11-29  5:10         ` Anshuman Khandual
2016-11-22 16:25 ` [PATCH 2/5] mm: migrate: Change migrate_mode to support combination migration modes Zi Yan
2016-11-22 16:25   ` Zi Yan
2016-11-24  8:15   ` Anshuman Khandual
2016-11-24  8:15     ` Anshuman Khandual
2016-11-28 14:31     ` Zi Yan
2016-11-28 14:31       ` Zi Yan
2016-11-25  0:06   ` Balbir Singh
2016-11-25  0:06     ` Balbir Singh
2016-11-22 16:25 ` [PATCH 3/5] migrate: Add copy_page_mt to use multi-threaded page migration Zi Yan
2016-11-22 16:25   ` Zi Yan
2016-11-24  9:26   ` Anshuman Khandual
2016-11-24  9:26     ` Anshuman Khandual
2016-11-28 15:03     ` Zi Yan
2016-11-28 15:03       ` Zi Yan
2016-11-29  6:03       ` Anshuman Khandual
2016-11-29  6:03         ` Anshuman Khandual
2016-11-22 16:25 ` [PATCH 4/5] mm: migrate: Add copy_page_mt into migrate_pages Zi Yan
2016-11-22 16:25   ` Zi Yan
2016-11-24  9:57   ` Anshuman Khandual
2016-11-24  9:57     ` Anshuman Khandual
2016-11-22 16:25 ` [PATCH 5/5] mm: migrate: Add vm.accel_page_copy in sysfs to control whether to use multi-threaded to accelerate page copy Zi Yan
2016-11-22 16:25   ` Zi Yan
2016-11-24 10:09   ` Anshuman Khandual [this message]
2016-11-24 10:09     ` Anshuman Khandual
2016-11-28 15:11     ` Zi Yan
2016-11-28 15:11       ` Zi Yan
2016-11-24 23:59 ` [PATCH 0/5] Parallel hugepage migration optimization Balbir Singh
2016-11-24 23:59   ` Balbir Singh
2016-11-28 15:22   ` Zi Yan
2016-11-28 15:22     ` Zi Yan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5836BC48.1080705@linux.vnet.ibm.com \
    --to=khandual@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=minchan@kernel.org \
    --cc=n-horiguchi@ah.jp.nec.com \
    --cc=vbabka@suse.cz \
    --cc=zi.yan@cs.rutgers.edu \
    --cc=zi.yan@sent.com \
    --cc=ziy@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.