All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Minchan Kim <minchan@kernel.org>,
	linux-mm@kvack.org, KOSAKI Motohiro <kosaki.motohiro@gmail.com>
Subject: Re: needed lru_add_drain_all() change
Date: Wed, 27 Jun 2012 12:31:15 +0200	[thread overview]
Message-ID: <1340793075.10063.24.camel@twins> (raw)
In-Reply-To: <20120626234603.779f5cbb.akpm@linux-foundation.org>

On Tue, 2012-06-26 at 23:46 -0700, Andrew Morton wrote:
> btw, the first step should be to audit all lru_add_drain_all() sites
> and work out exactly why they are calling lru_add_drain_all() - what
> are they trying to achive?

# git grep lru_add_drain_all
fs/block_dev.c: lru_add_drain_all();    /* make sure all lru add caches are flushed */
include/linux/swap.h:extern int lru_add_drain_all(void);
mm/compaction.c:        lru_add_drain_all();
mm/compaction.c:                lru_add_drain_all();
mm/ksm.c:               lru_add_drain_all();
mm/memcontrol.c:                lru_add_drain_all();
mm/memcontrol.c:        lru_add_drain_all();
mm/memcontrol.c:        lru_add_drain_all();
mm/memory-failure.c:            lru_add_drain_all();
mm/memory_hotplug.c:            lru_add_drain_all();
mm/memory_hotplug.c:    lru_add_drain_all();
mm/migrate.c:   lru_add_drain_all();
mm/migrate.c:    * here to avoid lru_add_drain_all().
mm/mlock.c:     lru_add_drain_all();    /* flush pagevec */
mm/mlock.c:             lru_add_drain_all();    /* flush pagevec */
mm/page_alloc.c:         * For avoiding noise data, lru_add_drain_all() should be called
mm/page_alloc.c:        lru_add_drain_all();
mm/swap.c:int lru_add_drain_all(void)


I haven't audited all sites, but most of them try to flush the per-cpu
lru pagevecs to make sure the pages are on the lru so they can take them
off again ;-)

Take compaction for instance, if a page in the middle of a range is on a
per-cpu pagevec it can't move it and the compaction might fail.


Hmm, another alternative is teaching isolate_lru_page() and friends to
take pages from the pagevecs directly, not sure what that would take.

--
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:[~2012-06-27 10:31 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-26 21:37 needed lru_add_drain_all() change Andrew Morton
2012-06-27  0:55 ` Minchan Kim
2012-06-27  1:15   ` Andrew Morton
2012-06-27  1:20     ` Minchan Kim
2012-06-27  1:29       ` Andrew Morton
2012-06-27  2:09     ` Minchan Kim
2012-06-27  5:12       ` Andrew Morton
2012-06-27  5:41         ` Minchan Kim
2012-06-27  5:55           ` Andrew Morton
2012-06-27  6:33             ` Minchan Kim
2012-06-27  6:41               ` Andrew Morton
2012-06-27 10:27                 ` Peter Zijlstra
2012-06-27  6:46               ` Andrew Morton
2012-06-27 10:31                 ` Peter Zijlstra [this message]
2012-06-27 12:04 ` Peter Zijlstra
2012-06-28  6:23 ` KOSAKI Motohiro
2012-06-29  3:47   ` Kamezawa Hiroyuki
2012-06-28  7:43 ` Kamezawa Hiroyuki
2012-06-28 23:42   ` Minchan Kim
2012-06-29  3:24     ` Kamezawa Hiroyuki

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=1340793075.10063.24.camel@twins \
    --to=peterz@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=kosaki.motohiro@gmail.com \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    /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.