Hi, ext Frantisek Dufka wrote: >> If you want swap, I would suggest a fast SD card with a separate >> _partition_ for swap > > AFAIK since version 2.4 of linux kernel, swapping to file no longer goes > via filesystem code at all and speed is similar/same to swapping to > block device directly. Kernel swapping code makes mapping for blocks > belonging to swap file on the beginning and then uses underlying block > device directly (both for speed and for deadlock prevention). If the > file is not heavily fragmented speed should be the same. Fragmentation > is visible in kernel log when swap file is enabled (number of extents). I think the file system (especially one as trivial as FAT) overhead is trivial compared the Flash writing speed of the card. > As for corruption I'm not sure At least there were much more corruption reports from people who had enabled swap than from ones that hadn't. (It's possible that they are heavier users and therefore have more changes to mess things up with accidental USB cable removal, taking card out while it's still being used etc. But there were no re-producible use-cases for verifying these things.) > but I'd say it is not an issue too since file is already allocated > and filesystem code is not used when swapping. <speculation> Whenever you do a write to a Flash based media, the data is written somewhere else and the old block is GCed (with the HW API provided by the memory cards kernel just doesn't see it). Also, I think the Flash blocks could be larger than the ones used by kernel internally for swap (4kB?) or the VFAT allocation units, or they might not be aligned....? So... It's possible that swap can affect the contents of rest of the VFAT, especially if the swap file was made on a fragmented VFAT. </speculation> - Eero _______________________________________________ maemo-users mailing list maemo-users@xxxxxxxxx https://lists.maemo.org/mailman/listinfo/maemo-users