linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jerome Glisse <jglisse@redhat.com>
To: Pingfan Liu <kernelfans@gmail.com>
Cc: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
	Mel Gorman <mgorman@techsingularity.net>, Jan Kara <jack@suse.cz>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Michal Hocko <mhocko@suse.com>,
	Mike Kravetz <mike.kravetz@oracle.com>,
	Andrea Arcangeli <aarcange@redhat.com>,
	Matthew Wilcox <willy@infradead.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] mm/migrate: remove the duplicated code migrate_vma_collect_hole()
Date: Thu, 15 Aug 2019 13:22:53 -0400	[thread overview]
Message-ID: <20190815172253.GE30916@redhat.com> (raw)
In-Reply-To: <1565078411-27082-3-git-send-email-kernelfans@gmail.com>

On Tue, Aug 06, 2019 at 04:00:11PM +0800, Pingfan Liu wrote:
> After the previous patch which sees hole as invalid source,
> migrate_vma_collect_hole() has the same code as migrate_vma_collect_skip().
> Removing the duplicated code.

NAK this one too given previous NAK.

> 
> Signed-off-by: Pingfan Liu <kernelfans@gmail.com>
> Cc: "Jérôme Glisse" <jglisse@redhat.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Mel Gorman <mgorman@techsingularity.net>
> Cc: Jan Kara <jack@suse.cz>
> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
> Cc: Michal Hocko <mhocko@suse.com>
> Cc: Mike Kravetz <mike.kravetz@oracle.com>
> Cc: Andrea Arcangeli <aarcange@redhat.com>
> Cc: Matthew Wilcox <willy@infradead.org>
> To: linux-mm@kvack.org
> Cc: linux-kernel@vger.kernel.org
> ---
>  mm/migrate.c | 22 +++-------------------
>  1 file changed, 3 insertions(+), 19 deletions(-)
> 
> diff --git a/mm/migrate.c b/mm/migrate.c
> index 832483f..95e038d 100644
> --- a/mm/migrate.c
> +++ b/mm/migrate.c
> @@ -2128,22 +2128,6 @@ struct migrate_vma {
>  	unsigned long		end;
>  };
>  
> -static int migrate_vma_collect_hole(unsigned long start,
> -				    unsigned long end,
> -				    struct mm_walk *walk)
> -{
> -	struct migrate_vma *migrate = walk->private;
> -	unsigned long addr;
> -
> -	for (addr = start & PAGE_MASK; addr < end; addr += PAGE_SIZE) {
> -		migrate->src[migrate->npages] = 0;
> -		migrate->dst[migrate->npages] = 0;
> -		migrate->npages++;
> -	}
> -
> -	return 0;
> -}
> -
>  static int migrate_vma_collect_skip(unsigned long start,
>  				    unsigned long end,
>  				    struct mm_walk *walk)
> @@ -2173,7 +2157,7 @@ static int migrate_vma_collect_pmd(pmd_t *pmdp,
>  
>  again:
>  	if (pmd_none(*pmdp))
> -		return migrate_vma_collect_hole(start, end, walk);
> +		return migrate_vma_collect_skip(start, end, walk);
>  
>  	if (pmd_trans_huge(*pmdp)) {
>  		struct page *page;
> @@ -2206,7 +2190,7 @@ static int migrate_vma_collect_pmd(pmd_t *pmdp,
>  				return migrate_vma_collect_skip(start, end,
>  								walk);
>  			if (pmd_none(*pmdp))
> -				return migrate_vma_collect_hole(start, end,
> +				return migrate_vma_collect_skip(start, end,
>  								walk);
>  		}
>  	}
> @@ -2337,7 +2321,7 @@ static void migrate_vma_collect(struct migrate_vma *migrate)
>  
>  	mm_walk.pmd_entry = migrate_vma_collect_pmd;
>  	mm_walk.pte_entry = NULL;
> -	mm_walk.pte_hole = migrate_vma_collect_hole;
> +	mm_walk.pte_hole = migrate_vma_collect_skip;
>  	mm_walk.hugetlb_entry = NULL;
>  	mm_walk.test_walk = NULL;
>  	mm_walk.vma = migrate->vma;
> -- 
> 2.7.5
> 


  reply	other threads:[~2019-08-15 17:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-06  8:00 [PATCH 1/3] mm/migrate: clean up useless code in migrate_vma_collect_pmd() Pingfan Liu
2019-08-06  8:00 ` [PATCH 2/3] mm/migrate: see hole as invalid source page Pingfan Liu
2019-08-15 17:22   ` Jerome Glisse
2019-08-16 15:02     ` Pingfan Liu
2019-08-26  7:52       ` Pingfan Liu
2019-08-06  8:00 ` [PATCH 3/3] mm/migrate: remove the duplicated code migrate_vma_collect_hole() Pingfan Liu
2019-08-15 17:22   ` Jerome Glisse [this message]
2019-08-06 13:35 ` [PATCH 1/3] mm/migrate: clean up useless code in migrate_vma_collect_pmd() Matthew Wilcox
2019-08-07  5:28   ` Pingfan Liu
2019-08-07  8:41     ` [PATCHv2] " Pingfan Liu
2019-08-14 23:11       ` Ralph Campbell
2019-08-15 17:19       ` Jerome Glisse
2019-08-15 19:23         ` Ralph Campbell
2019-08-15 19:40           ` Jerome Glisse
2019-08-16 13:21             ` Pingfan Liu

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=20190815172253.GE30916@redhat.com \
    --to=jglisse@redhat.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=jack@suse.cz \
    --cc=kernelfans@gmail.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@suse.com \
    --cc=mike.kravetz@oracle.com \
    --cc=willy@infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).