From: "Jörn Engel" <joern@logfs.org>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: mgorman@suse.de, linux-mm@kvack.org
Subject: Re: [RFC PATCH 4/6] mm: munlock: batch NR_MLOCK zone state updates
Date: Mon, 5 Aug 2013 13:23:34 -0400 [thread overview]
Message-ID: <20130805172333.GC470@logfs.org> (raw)
In-Reply-To: <1375713125-18163-5-git-send-email-vbabka@suse.cz>
On Mon, 5 August 2013 16:32:03 +0200, Vlastimil Babka wrote:
>
> Depending on previous batch which introduced batched isolation in
> munlock_vma_range(), we can batch also the updates of NR_MLOCK
> page stats. After the whole pagevec is processed for page isolation,
> the stats are updated only once with the number of successful isolations.
> There were however no measurable perfomance gains.
Neat. This answers a question I've had when reading patch 3/6.
> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
> ---
> mm/mlock.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/mm/mlock.c b/mm/mlock.c
> index 08689b6..d112e06 100644
> --- a/mm/mlock.c
> +++ b/mm/mlock.c
> @@ -238,6 +238,7 @@ static void __munlock_pagevec(struct pagevec *pvec, struct zone *zone)
> {
> int i;
> int nr = pagevec_count(pvec);
> + int delta_munlocked = -nr;
>
> /* Phase 1: page isolation */
> spin_lock_irq(&zone->lru_lock);
> @@ -248,9 +249,6 @@ static void __munlock_pagevec(struct pagevec *pvec, struct zone *zone)
> struct lruvec *lruvec;
> int lru;
>
> - /* we have disabled interrupts */
> - __mod_zone_page_state(zone, NR_MLOCK, -1);
> -
> switch (__isolate_lru_page(page,
> ISOLATE_UNEVICTABLE)) {
> case 0:
> @@ -275,8 +273,10 @@ skip_munlock:
> */
> pvec->pages[i] = NULL;
> put_page(page);
> + delta_munlocked++;
> }
> }
> + __mod_zone_page_state(zone, NR_MLOCK, delta_munlocked);
> spin_unlock_irq(&zone->lru_lock);
>
> /* Phase 2: page munlock and putback */
> --
> 1.8.1.4
>
JA?rn
--
Doubt is not a pleasant condition, but certainty is an absurd one.
-- Voltaire
--
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>
next prev parent reply other threads:[~2013-08-05 18:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-05 14:31 [RFC PATCH 0/6] Improving munlock() performance for large non-THP areas Vlastimil Babka
2013-08-05 14:32 ` [RFC PATCH 1/6] mm: putback_lru_page: remove unnecessary call to page_lru_base_type() Vlastimil Babka
2013-08-05 14:32 ` [RFC PATCH 2/6] mm: munlock: remove unnecessary call to lru_add_drain() Vlastimil Babka
2013-08-05 14:32 ` [RFC PATCH 3/6] mm: munlock: batch non-THP page isolation and munlock+putback using pagevec Vlastimil Babka
2013-08-05 17:21 ` Jörn Engel
2013-08-06 13:27 ` Vlastimil Babka
2013-08-06 16:21 ` Jörn Engel
2013-08-05 14:32 ` [RFC PATCH 4/6] mm: munlock: batch NR_MLOCK zone state updates Vlastimil Babka
2013-08-05 17:23 ` Jörn Engel [this message]
2013-08-05 14:32 ` [RFC PATCH 5/6] mm: munlock: bypass per-cpu pvec for putback_lru_page Vlastimil Babka
2013-08-05 14:32 ` [RFC PATCH 6/6] mm: munlock: remove redundant get_page/put_page pair on the fast path Vlastimil Babka
2013-08-05 17:31 ` [RFC PATCH 0/6] Improving munlock() performance for large non-THP areas Jörn Engel
2013-08-06 16:39 ` Jörn Engel
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=20130805172333.GC470@logfs.org \
--to=joern@logfs.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=vbabka@suse.cz \
/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).