linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Pradeep Goswami (Pradeep Kumar Goswami)" <Pradeep.Goswami@spreadtrum.com>
To: "rebecca@android.com" <rebecca@android.com>,
	"vdavydov@parallels.com" <vdavydov@parallels.com>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"vbabka@suse.cz" <vbabka@suse.cz>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"sanjeev.yadav@spreatrum.com" <sanjeev.yadav@spreatrum.com>
Subject: [PATCH]mm:Correctly update number of rotated pages on active list.
Date: Thu, 3 Dec 2015 10:08:11 +0000	[thread overview]
Message-ID: <20151203100809.GA4544@pradeepkumarubtnb.spreadtrum.com> (raw)

This patch corrects the number of pages which are rotated on active list.
The counter for rotated pages effects the number of pages
to be scanned on active pages list in  low memory situations.

Signed-off-by: Pradeep Goswami <pradeep.goswami@spredtrum.com>
Cc: Rebecca Schultz Zavin <rebecca@android.com>
Cc: Vladimir Davydov <vdavydov@parallels.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
--- a/mm/vmscan.c       2015-11-18 20:55:38.208838142 +0800
+++ b/mm/vmscan.c       2015-11-19 14:37:31.189838998 +0800
@@ -1806,7 +1806,6 @@ static void shrink_active_list(unsigned
 
                if (page_referenced(page, 0, sc->target_mem_cgroup,
                                    &vm_flags)) {
-                       nr_rotated += hpage_nr_pages(page);
                        /*  
                         * Identify referenced, file-backed active pages and 
                         * give them one more trip around the active list. So
@@ -1818,6 +1817,7 @@ static void shrink_active_list(unsigned
                         */  
                        if ((vm_flags & VM_EXEC) && page_is_file_cache(page)) {
                                list_add(&page->lru, &l_active);
+                               nr_rotated += hpage_nr_pages(page);
                                continue;
                        }   
                }   

Thanks,
Pradeep.
--
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-12-03 10:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-03 10:08 Pradeep Goswami (Pradeep Kumar Goswami) [this message]
2015-12-03 10:59 ` [PATCH]mm:Correctly update number of rotated pages on active list Michal Hocko
2015-12-03 14:46   ` Pradeep Goswami (Pradeep Kumar Goswami)

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=20151203100809.GA4544@pradeepkumarubtnb.spreadtrum.com \
    --to=pradeep.goswami@spreadtrum.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rebecca@android.com \
    --cc=sanjeev.yadav@spreatrum.com \
    --cc=vbabka@suse.cz \
    --cc=vdavydov@parallels.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).