Hi,

On 15 Apr 1999 00:13:48 -0000, <[EMAIL PROTECTED]> said:

> AFAIK, the swap code uses raw file blocks on disk, rather than passing
> through to vfs, cause you dont want to cache swap accesses, think
> about it :)

Sort of correct.  It does bypass most of the VFS, but it does use the
standard block device IO routines.

> this is how swap can work on a partition or a file, cause at swapon
> time, the blocks are mapped for direct access.

No, for files, we do the mapping on demand, not all at once on swapon. 

> swap running on raid then, if it works at all, is not actually
> protecting you.  

Yes it is.  Swapping is not done inside the VFS, but neither is RAID.
RAID works under the hood of the block device IO routines
(drivers/block/ll_rw_block.c), so both VFS and swap will take full
advantage of any RAID devices being used.

--Stephen

Reply via email to