linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Neil Schemenauer <nascheme@enme.ucalgary.ca>
To: linux-mm@kvack.org
Subject: shrink_mmap bug in 2.2?
Date: Wed, 14 Jun 2000 18:50:34 -0600	[thread overview]
Message-ID: <20000614185034.A2505@acs.ucalgary.ca> (raw)

This code looks strange to me (possibly because I don't
understand it):

    /*
     * Is it a page swap page? If so, we want to
     * drop it if it is no longer used, even if it
     * were to be marked referenced..
     */
    if (PageSwapCache(page)) {
            if (referenced && swap_count(page->offset) != 1)
                    continue;
            delete_from_swap_cache(page);
            return 1;
    }       

Can pages be deleted from the swap cache if swap_count is not
one?  If not, then I think this code is wrong.  It should be:

    if (PageSwapCache(page)) {
            if (swap_count(page->offset) != 1)
                    continue;
            delete_from_swap_cache(page);
            return 1;
    }       
 
Thanks in advance for any help.

    Neil

-- 
"God, root, what is difference?" - Pitr
"God is more forgiving." - Dave Aronson
--
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.eu.org/Linux-MM/

             reply	other threads:[~2000-06-15  0:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-06-15  0:50 Neil Schemenauer [this message]
2000-06-15  1:16 ` Kanoj Sarcar
2000-06-15  8:58   ` volodya
2000-06-15 16:56     ` Kanoj Sarcar
2000-06-15 19:12   ` Neil Schemenauer
2000-06-16 10:05     ` Stephen C. Tweedie

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=20000614185034.A2505@acs.ucalgary.ca \
    --to=nascheme@enme.ucalgary.ca \
    --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