All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Christoph Lameter <cl@linux.com>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	linux-mm@kvack.org, Konstantin Khlebnikov <koct9i@gmail.com>,
	Rik van Riel <riel@redhat.com>
Subject: Re: [PATCH] mm: use PageAnon() and PageKsm() helpers in page_anon_vma()
Date: Thu, 2 Apr 2015 01:02:46 +0300	[thread overview]
Message-ID: <20150401220246.GA19758@node.dhcp.inet.fi> (raw)
In-Reply-To: <20150401125745.421a6af61bd20246a76c5b83@linux-foundation.org>

On Wed, Apr 01, 2015 at 12:57:45PM -0700, Andrew Morton wrote:
> On Wed, 1 Apr 2015 14:50:54 +0300 "Kirill A. Shutemov" <kirill@shutemov.name> wrote:
> 
> > >From adc384977898173d65c2567fc5eb421da9b272e0 Mon Sep 17 00:00:00 2001
> > From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
> > Date: Wed, 1 Apr 2015 14:33:56 +0300
> > Subject: [PATCH] mm: uninline and cleanup page-mapping related helpers
> > 
> > Most-used page->mapping helper -- page_mapping() -- has already
> > uninlined. Let's uninline also page_rmapping() and page_anon_vma().
> > It saves us depending on configuration around 400 bytes in text:
> > 
> >    text	   data	    bss	    dec	    hex	filename
> >  660318	  99254	 410000	1169572	 11d8a4	mm/built-in.o-before
> >  659854	  99254	 410000	1169108	 11d6d4	mm/built-in.o
> 
> Well, code size isn't the only thing to care about.  Some functions
> really should be inlined for performance reasons even if that makes the
> overall code larger.  But the changes you're proposing here look OK to
> me.
> 
> > As side effect page_anon_vma() now works properly on tail pages.
> 
> Let's fix the bug in a separate patch, please.  One which can be
> backported to earlier kernels if that should be needed.  ie: it should
> precede any uninlining.

The bug is not triggerable in current upsteam. AFAIK, we don't call
page_anon_vma() on tail pages of THP, since we don't map THP with PTEs
yet. For rest of cases we will get NULL, which is valid answer.

Do you still want "page = compound_head(page);" line in separate patch?

-- 
 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-04-01 22:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-31 11:50 [PATCH] mm: use PageAnon() and PageKsm() helpers in page_anon_vma() Kirill A. Shutemov
2015-03-31 13:11 ` Christoph Lameter
2015-03-31 14:35   ` Kirill A. Shutemov
2015-03-31 20:33     ` Andrew Morton
2015-04-01 11:50       ` Kirill A. Shutemov
2015-04-01 19:57         ` Andrew Morton
2015-04-01 22:02           ` Kirill A. Shutemov [this message]
2015-04-01 22:06             ` Andrew Morton
2015-04-02 11:34               ` 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=20150401220246.GA19758@node.dhcp.inet.fi \
    --to=kirill@shutemov.name \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=koct9i@gmail.com \
    --cc=linux-mm@kvack.org \
    --cc=riel@redhat.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.