linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: Bob Liu <lliubbo@gmail.com>
Cc: kosaki.motohiro@jp.fujitsu.com, akpm@linux-foundation.org,
	linux-mm@kvack.org
Subject: Re: [PATCH] __isolate_lru_page: skip unneeded mode check
Date: Thu,  1 Apr 2010 10:39:22 +0900 (JST)	[thread overview]
Message-ID: <20100401103210.12C0.A69D9226@jp.fujitsu.com> (raw)
In-Reply-To: <w2gcf18f8341003311830pb0d697efi721641050c88a254@mail.gmail.com>

> >> @@ -862,15 +862,10 @@ int __isolate_lru_page(struct page *page, int mode,
> >> int file)
> >>        if (!PageLRU(page))
> >>                return ret;
> >>
> >> -       /*
> >> -        * When checking the active state, we need to be sure we are
> >> -        * dealing with comparible boolean values.  Take the logical not
> >> -        * of each.
> >> -        */
> >> -       if (mode != ISOLATE_BOTH && (!PageActive(page) != !mode))
> >> +       if (mode != ISOLATE_BOTH && (PageActive(page) != mode))
> >>                return ret;
> >
> > no. please read the comment.
> >
> 
> Hm,. I have read it, but still miss it :-).
> PageActive(page) will return an int 0 or 1, mode is also int 0 or 1(
> already != ISOLATE_BOTH).
> There are comparible and why must to be sure to boolean values?

hm, ok. you are right.
please resend this part as individual patch.


> >> -       if (mode != ISOLATE_BOTH && page_is_file_cache(page) != file)
> >> +       if (page_is_file_cache(page) != file)
> >>                return ret;
> >
> > no. please consider lumpy reclaim.
> 
> During lumpy reclaim mode is ISOLATE_BOTH, that case we don't check
> page_is_file_cache() ?  Would you please explain it a little more ,i
> am still unclear about it.
> Thanks a lot.

ISOLATE_BOTH is for to help allocate high order memory. then,
it ignore both PageActive() and page_is_file_cache(). otherwise,
we fail to allocate high order memory.


--
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:[~2010-04-01  1:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-31 14:10 Bob Liu
2010-03-31 14:17 ` KOSAKI Motohiro
2010-04-01  1:30   ` Bob Liu
2010-04-01  1:39     ` KOSAKI Motohiro [this message]
2010-04-01 13:42       ` Bob Liu

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=20100401103210.12C0.A69D9226@jp.fujitsu.com \
    --to=kosaki.motohiro@jp.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=lliubbo@gmail.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