Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: kosaki.motohiro@jp.fujitsu.com, Vincent Li <macli@brc.ubc.ca>,
	linux-mm <linux-mm@kvack.org>
Subject: Re: [PATCH]  [for mmotm-1113] mm: Simplify try_to_unmap_one()
Date: Fri,  4 Dec 2009 17:29:43 +0900 (JST)	[thread overview]
Message-ID: <20091204172806.588F.A69D9226@jp.fujitsu.com> (raw)
In-Reply-To: <20091119152748.3E37.A69D9226@jp.fujitsu.com>

> > 
> > 
> > On Thu, 19 Nov 2009, KOSAKI Motohiro wrote:
> > 
> > > > 
> > > > Hi KOSAKI,
> > > > 
> > > > Thank you for the comment, I am still little confused with the last 
> > > > sentence.
> > > > 
> > > > On Thu, 19 Nov 2009, KOSAKI Motohiro wrote:
> > > > 
> > > > > 
> > > > > +
> > > > > +	/*
> > > > > +	 * We need mmap_sem locking, Otherwise VM_LOCKED check makes
> > > > > +	 * unstable result and race. Plus, We can't wait here because
> > > > > +	 * we now hold anon_vma->lock or mapping->i_mmap_lock.
> > > > > +	 * If trylock failed, The page remain evictable lru and
> > > > > +	 * retry to more unevictable lru by later vmscan.
> > > >            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ I am having 
> > > > trouble to undestand it. Yeah, I should read more code, but the sentence 
> > > > itself make me confused :).
> > > 
> > > Um, this is wrong.
> > > Probably, It should be
> > > 
> > > 	retry to move unevictable lru later.
> > > 
> > > Do you agree this?
> > 
> > Ah, let's see if I understand you correctly, if trylock failed, the page 
> > remain in evictable lru and later vmscan could retry to move the page to 
> > unevictable lru if the page is actually mlocked? 
> 
> Ah, your sentence is better. can you please change code itself?

Fix is here.

------------------------------------------
Subject: [PATCH] try_to_unmap_one() comment fix

Viencent Li pointed out current comment is wrong. This patch fixes it.

Reported-by: Vincent Li <macli@brc.ubc.ca>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
---
 mm/rmap.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/mm/rmap.c b/mm/rmap.c
index f1a9f7d..278cd27 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -875,8 +875,9 @@ out_mlock:
 	 * We need mmap_sem locking, Otherwise VM_LOCKED check makes
 	 * unstable result and race. Plus, We can't wait here because
 	 * we now hold anon_vma->lock or mapping->i_mmap_lock.
-	 * If trylock failed, The page remain evictable lru and
-	 * retry to more unevictable lru by later vmscan.
+	 * if trylock failed, the page remain in evictable lru and later
+	 * vmscan could retry to move the page to unevictable lru if the
+	 * page is actually mlocked.
 	 */
 	if (down_read_trylock(&vma->vm_mm->mmap_sem)) {
 		if (vma->vm_flags & VM_LOCKED) {
-- 
1.6.5.2



--
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>

      parent reply	other threads:[~2009-12-04  8:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-17  8:39 [PATCH] [for mmotm-1113] mm: Simplify try_to_unmap_one() KOSAKI Motohiro
2009-11-18 16:34 ` Hugh Dickins
2009-11-18 23:18 ` Andrew Morton
2009-11-19  1:23   ` KOSAKI Motohiro
2009-11-19  5:27     ` Vincent Li
2009-11-19  5:49       ` KOSAKI Motohiro
2009-11-19  6:14         ` Vincent Li
2009-11-19  6:28           ` KOSAKI Motohiro
2009-11-19  7:11             ` Vincent Li
2009-12-04  8:29             ` KOSAKI Motohiro [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=20091204172806.588F.A69D9226@jp.fujitsu.com \
    --to=kosaki.motohiro@jp.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=macli@brc.ubc.ca \
    /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