* scan_swap_map
@ 2003-09-13 16:07 Anand Eswaran
0 siblings, 0 replies; only message in thread
From: Anand Eswaran @ 2003-09-13 16:07 UTC (permalink / raw)
To: linux-mm
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>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-09-13 16:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-13 16:07 scan_swap_map Anand Eswaran
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox