From: "Anand Eswaran" <aeswaran@andrew.cmu.edu>
To: linux-mm@kvack.org
Subject: scan_swap_map
Date: Sat, 13 Sep 2003 12:07:15 -0400 (EDT) [thread overview]
Message-ID: <4939.128.2.216.53.1063469235.squirrel@webmail.andrew.cmu.edu> (raw)
Hi :
Based on the scan_swap_map() code in swapfile.c in Linux 2.4, it seems
to me that the swapmap cannot get fragmented ie there will *ALWAYS* be
contiguous allocation within the swap device.
(1) Within a cluster, there is always contiguous allocation of free swap
entries.
(2) As soon as a cluster is filled with 1's, a new cluster is chosen
HOWEVER, since lowest_bit is marked as the lowest free entry offset,
and assuming that the system started aligned to SWAPFILE_CLUSTER, the new
cluster will again be contigous to the previous cluster.
If this is true, I dont understand the need for the "fine-grained" for
loop in which a brute force scan is made to find any free entry - it
seems to me like this code will never need to be executed.
Am I missing something important here?
Thanks,
-----
Anand.
--
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:[~2003-09-13 16:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4939.128.2.216.53.1063469235.squirrel@webmail.andrew.cmu.edu \
--to=aeswaran@andrew.cmu.edu \
--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