linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: George Spelvin <linux@horizon.com>
Cc: ebiggers3@gmail.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: Bloat caused by unnecessary calls to compound_head()?
Date: Sun, 27 Mar 2016 23:44:13 +0300	[thread overview]
Message-ID: <20160327204413.GB9638@node.shutemov.name> (raw)
In-Reply-To: <20160327203304.9695.qmail@ns.horizon.com>

On Sun, Mar 27, 2016 at 04:33:04PM -0400, George Spelvin wrote:
> Could you just mark compound_head __pure?  That would tell the compiler
> that it's safe to re-use the return value as long as there is no memory
> mutation in between.
> 

Hm. It has some positive impact, but it's not dramatic. For instance,
mm/swap.o results:

add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-43 (-43)
function                                     old     new   delta
__page_cache_release                         319     298     -21
release_pages                                722     700     -22

mark_page_accessed() problem was not fixed by that.

-- 
 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:[~2016-03-27 20:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-27 20:33 Bloat caused by unnecessary calls to compound_head()? George Spelvin
2016-03-27 20:44 ` Kirill A. Shutemov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-03-26 18:50 Eric Biggers
2016-03-27 19:46 ` Kirill A. Shutemov
2016-04-01  1:33   ` Eric Biggers
2016-04-04 10:39     ` 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=20160327204413.GB9638@node.shutemov.name \
    --to=kirill@shutemov.name \
    --cc=ebiggers3@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux@horizon.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).