Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1365632

Re: [PATCHv4 00/25] THP-enabled tmpfs/shmem

From Hugh Dickins <hughd@google.com>
Newsgroups linux.kernel
Subject Re: [PATCHv4 00/25] THP-enabled tmpfs/shmem
Date 2016-03-28 20:50 +0200
Message-ID <rhKoG-2xy-3@gated-at.bofh.it> (permalink)
References (2 earlier) <rg9AR-p3-7@gated-at.bofh.it> <rgiNQ-7cM-19@gated-at.bofh.it> <rgBx8-3pJ-17@gated-at.bofh.it> <rgJXH-17m-1@gated-at.bofh.it> <rhJLX-2kc-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, 28 Mar 2016, Kirill A. Shutemov wrote:
> 
> I think I found it. I have refcounting screwed up in faultaround.
> 
> This should fix the problem:

Yes, this fixes it for me - thanks.

Hugh

> 
> diff --git a/mm/filemap.c b/mm/filemap.c
> index 94c097ec08e7..1325bb4568d1 100644
> --- a/mm/filemap.c
> +++ b/mm/filemap.c
> @@ -2292,19 +2292,18 @@ repeat:
>  		if (fe->pte)
>  			fe->pte += iter.index - last_pgoff;
>  		last_pgoff = iter.index;
> -		alloc_set_pte(fe, NULL, page);
> +		if (alloc_set_pte(fe, NULL, page))
> +			goto unlock;
>  		unlock_page(page);
> -		/* Huge page is mapped? No need to proceed. */
> -		if (pmd_trans_huge(*fe->pmd))
> -			break;
> -		/* Failed to setup page table? */
> -		VM_BUG_ON(!fe->pte);
>  		goto next;
>  unlock:
>  		unlock_page(page);
>  skip:
>  		page_cache_release(page);
>  next:
> +		/* Huge page is mapped? No need to proceed. */
> +		if (pmd_trans_huge(*fe->pmd))
> +			break;
>  		if (iter.index == end_pgoff)
>  			break;
>  	}
> -- 
>  Kirill A. Shutemov

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCHv4 00/25] THP-enabled tmpfs/shmem Hugh Dickins <hughd@google.com> - 2016-03-23 21:10 +0100
  Re: [PATCHv4 00/25] THP-enabled tmpfs/shmem "Kirill A. Shutemov" <kirill@shutemov.name> - 2016-03-24 10:20 +0100
    Re: [PATCHv4 00/25] THP-enabled tmpfs/shmem Hugh Dickins <hughd@google.com> - 2016-03-24 20:10 +0100
      Re: [PATCHv4 00/25] THP-enabled tmpfs/shmem "Kirill A. Shutemov" <kirill@shutemov.name> - 2016-03-25 16:10 +0100
        Re: [PATCHv4 00/25] THP-enabled tmpfs/shmem Hugh Dickins <hughd@google.com> - 2016-03-26 01:10 +0100
          Re: [PATCHv4 00/25] THP-enabled tmpfs/shmem "Kirill A. Shutemov" <kirill@shutemov.name> - 2016-03-28 20:10 +0200
            Re: [PATCHv4 00/25] THP-enabled tmpfs/shmem Hugh Dickins <hughd@google.com> - 2016-03-28 20:50 +0200
  Re: [PATCHv4 00/25] THP-enabled tmpfs/shmem "Kirill A. Shutemov" <kirill@shutemov.name> - 2016-03-28 14:30 +0200

csiph-web