All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Vladimir Davydov <vdavydov@virtuozzo.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	Randy Dunlap <rdunlap@infradead.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	Linux MM <linux-mm@kvack.org>
Subject: Re: linux-next: Tree for Nov 27 (mm stuff)
Date: Fri, 27 Nov 2015 16:40:06 +0200	[thread overview]
Message-ID: <20151127144006.GA15674@node.shutemov.name> (raw)
In-Reply-To: <20151127101640.GO29014@esperanza>

On Fri, Nov 27, 2015 at 01:16:40PM +0300, Vladimir Davydov wrote:
> On Fri, Nov 27, 2015 at 06:17:39PM +0900, Sergey Senozhatsky wrote:
> > Cc Vladimir, Kirill, Andrew
> > 
> > On (11/27/15 18:10), Sergey Senozhatsky wrote:
> > > On (11/26/15 23:04), Randy Dunlap wrote:
> > > > 
> > > > on i386:
> > > > 
> > > > mm/built-in.o: In function `page_referenced_one':
> > > > rmap.c:(.text+0x362a2): undefined reference to `pmdp_clear_flush_young'
> > > > mm/built-in.o: In function `page_idle_clear_pte_refs_one':
> > > > page_idle.c:(.text+0x4b2b8): undefined reference to `pmdp_test_and_clear_young'
> > > > 
> > > 
> > > Hello,
> > > 
> > > https://lkml.org/lkml/2015/11/24/160
> > > 
> > > corresponding patch mm-add-page_check_address_transhuge-helper-fix.patch added
> > > to -mm tree.
> > > 
> > 
> > my bad, it's in -next already.
> 
> Sigh, this fails for me too :-( Kirill was right that this hack might
> not always work.
> 
> So, we still need to check explicitly if CONFIG_TRANSPARENT_HUGEPAGE is
> enabled whenever we use page_check_address_transhuge, as Kirill proposed
> initially. The patch below does the trick. The previous "fix" is still
> useful though, because it reduces the size of kernels compiled w/o
> tranparent huge page feature.
> 
> Andrew, could you please merge this patch too?
> 
> Sorry for all the trouble.
> 
> Thanks,
> Vladimir
> ---
> diff --git a/mm/page_idle.c b/mm/page_idle.c
> index 374931f..aa7ca61 100644
> --- a/mm/page_idle.c
> +++ b/mm/page_idle.c
> @@ -66,7 +66,7 @@ static int page_idle_clear_pte_refs_one(struct page *page,
>  	if (pte) {
>  		referenced = ptep_clear_young_notify(vma, addr, pte);
>  		pte_unmap(pte);
> -	} else
> +	} else if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE))
>  		referenced = pmdp_clear_young_notify(vma, addr, pmd);

I would like to have yet another 'else' with warning just in case, as I
proposed initially:

https://lkml.kernel.org/g/20151124090930.GB15712@node.shutemov.name

-- 
 Kirill A. Shutemov

WARNING: multiple messages have this Message-ID (diff)
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Vladimir Davydov <vdavydov@virtuozzo.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	Randy Dunlap <rdunlap@infradead.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	Linux MM <linux-mm@kvack.org>
Subject: Re: linux-next: Tree for Nov 27 (mm stuff)
Date: Fri, 27 Nov 2015 16:40:06 +0200	[thread overview]
Message-ID: <20151127144006.GA15674@node.shutemov.name> (raw)
In-Reply-To: <20151127101640.GO29014@esperanza>

On Fri, Nov 27, 2015 at 01:16:40PM +0300, Vladimir Davydov wrote:
> On Fri, Nov 27, 2015 at 06:17:39PM +0900, Sergey Senozhatsky wrote:
> > Cc Vladimir, Kirill, Andrew
> > 
> > On (11/27/15 18:10), Sergey Senozhatsky wrote:
> > > On (11/26/15 23:04), Randy Dunlap wrote:
> > > > 
> > > > on i386:
> > > > 
> > > > mm/built-in.o: In function `page_referenced_one':
> > > > rmap.c:(.text+0x362a2): undefined reference to `pmdp_clear_flush_young'
> > > > mm/built-in.o: In function `page_idle_clear_pte_refs_one':
> > > > page_idle.c:(.text+0x4b2b8): undefined reference to `pmdp_test_and_clear_young'
> > > > 
> > > 
> > > Hello,
> > > 
> > > https://lkml.org/lkml/2015/11/24/160
> > > 
> > > corresponding patch mm-add-page_check_address_transhuge-helper-fix.patch added
> > > to -mm tree.
> > > 
> > 
> > my bad, it's in -next already.
> 
> Sigh, this fails for me too :-( Kirill was right that this hack might
> not always work.
> 
> So, we still need to check explicitly if CONFIG_TRANSPARENT_HUGEPAGE is
> enabled whenever we use page_check_address_transhuge, as Kirill proposed
> initially. The patch below does the trick. The previous "fix" is still
> useful though, because it reduces the size of kernels compiled w/o
> tranparent huge page feature.
> 
> Andrew, could you please merge this patch too?
> 
> Sorry for all the trouble.
> 
> Thanks,
> Vladimir
> ---
> diff --git a/mm/page_idle.c b/mm/page_idle.c
> index 374931f..aa7ca61 100644
> --- a/mm/page_idle.c
> +++ b/mm/page_idle.c
> @@ -66,7 +66,7 @@ static int page_idle_clear_pte_refs_one(struct page *page,
>  	if (pte) {
>  		referenced = ptep_clear_young_notify(vma, addr, pte);
>  		pte_unmap(pte);
> -	} else
> +	} else if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE))
>  		referenced = pmdp_clear_young_notify(vma, addr, pmd);

I would like to have yet another 'else' with warning just in case, as I
proposed initially:

https://lkml.kernel.org/g/20151124090930.GB15712@node.shutemov.name

-- 
 Kirill A. Shutemov

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

  reply	other threads:[~2015-11-27 14:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-27  5:05 linux-next: Tree for Nov 27 Stephen Rothwell
2015-11-27  7:04 ` linux-next: Tree for Nov 27 (mm stuff) Randy Dunlap
2015-11-27  9:10   ` Sergey Senozhatsky
2015-11-27  9:10     ` Sergey Senozhatsky
2015-11-27  9:17     ` Sergey Senozhatsky
2015-11-27  9:17       ` Sergey Senozhatsky
2015-11-27 10:16       ` Vladimir Davydov
2015-11-27 10:16         ` Vladimir Davydov
2015-11-27 10:16         ` Vladimir Davydov
2015-11-27 14:40         ` Kirill A. Shutemov [this message]
2015-11-27 14:40           ` Kirill A. Shutemov

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=20151127144006.GA15674@node.shutemov.name \
    --to=kirill@shutemov.name \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-next@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=sfr@canb.auug.org.au \
    --cc=vdavydov@virtuozzo.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.