linux-mm.kvack.org archive mirror
 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 14:34:17 +0300	[thread overview]
Message-ID: <20150402113417.GB24028@node.dhcp.inet.fi> (raw)
In-Reply-To: <20150401150653.92c0490016e3e3577cfabb31@linux-foundation.org>

On Wed, Apr 01, 2015 at 03:06:53PM -0700, Andrew Morton wrote:
> On Thu, 2 Apr 2015 01:02:46 +0300 "Kirill A. Shutemov" <kirill@shutemov.name> wrote:
> 
> > 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.
> 
> argh.  It rather helps if you can tell me when this happens (and which
> patch it fixes).  I sometimes spend quite a bit of time runnnig around
> in circles wondering what the heck tree/patch just got fixed.

Sorry for the mess.

> > Do you still want "page = compound_head(page);" line in separate patch?
> 
> I think that would be best.  That way the offending patch gets fixed
> and doesn't get bundled up with an unrelated change.

I've sent updated "mm: sanitize page->mapping for tail pages" patch that
care about this part. And this is uninlining patch on top of updated
patch.

      reply	other threads:[~2015-04-02 11:34 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
2015-04-01 22:06             ` Andrew Morton
2015-04-02 11:34               ` Kirill A. Shutemov [this message]

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=20150402113417.GB24028@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 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).