lkml.org 
[lkml]   [2005]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Swap partition vs swap file
Bernd Eckenfels wrote:
> In article <20050710014559.GA15844@animx.eu.org> you wrote:
> > You misunderstood entirely what I said.
>
> There is no portable/documented way to grow a file without having the file
> system null its content. However why is that a problem, you dont create
> those files very often. Besides it is better for the OS to be able to asume
> that a page with zeros in it is equal to the page on fresh swap.

So are you saying that if I create a swap partition it's best to use dd to
zero it out before mkswap? If no, then why would a file be different? I
know there's no documented way to create a file of given size without
writing content. I saw windows grow a pagefile several meg in less than a
second so I'm sure that it doesn't zero out the space first.

As far as portable, we're talking about linux, portability is not an issue
in this case. I myself don't use swap files (or partitions), however, there
was a project I recall that would dynamically add/remove swap as needed.
Creating a file of 20-50mb quickly would have been beneficial.

--
Lab tests show that use of micro$oft causes cancer in lab animals
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-07-10 14:41    [W:0.054 / U:0.844 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site