public inbox for linux-mm@kvack.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
To: linux-mm@kvack.org
Subject: refill_inactive_zone question
Date: Fri, 27 Aug 2004 16:07:14 -0300	[thread overview]
Message-ID: <20040827190714.GB3332@logos.cnet> (raw)

Hi MM gurus, 

Reading refill_inactive_zone(), while looping on pages grabbed from the inactive list (l_hold), 
refill_inactive_zone() it does:

                                                                                                                                                                                  
        while (!list_empty(&l_hold)) {
                page = lru_to_page(&l_hold);
                list_del(&page->lru);
                if (page_mapped(page)) {
                        if (!reclaim_mapped) {
                                list_add(&page->lru, &l_active);
                                continue;
                        }
                        page_map_lock(page);
                        if (page_referenced(page)) {
                                page_map_unlock(page);
                                list_add(&page->lru, &l_active);
                                continue;
                        }
                        page_map_unlock(page);
                }
                /*
                 * FIXME: need to consider page_count(page) here if/when we
                 * reap orphaned pages via the LRU (Daniel's locking stuff)
                 */
                if (total_swap_pages == 0 && PageAnon(page)) { 
                        list_add(&page->lru, &l_active);
                        continue;
                }
                list_add(&page->lru, &l_inactive);
        }


Is it possible to have AnonPages without a mapping to them? I dont think so.

Can't the check "if (total_swap_pages == 0 && PageAnon(page))" be moved
inside "if (page_mapped(page))" ? 

TIA!
--
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:"aart@kvack.org"> aart@kvack.org </a>

             reply	other threads:[~2004-08-27 21:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-27 19:07 Marcelo Tosatti [this message]
2004-08-27 21:17 ` refill_inactive_zone question Hugh Dickins
2004-08-27 20:16   ` Marcelo Tosatti
2004-08-27 20:28     ` Marcelo Tosatti
2004-08-28 16:08     ` Hugh Dickins
2004-08-28 16:43       ` Martin J. Bligh

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=20040827190714.GB3332@logos.cnet \
    --to=marcelo.tosatti@cyclades.com \
    --cc=linux-mm@kvack.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox