> - use mtdram driver to make a MTD device out of ram
mtdram driver simply simulates MTD device in ram - no compression and no memory management (it simply preallocates all the memory). Also, there are unnecessary overheads involved -- simulate erasing eraseblock and such.
> - use jffs2 with compression enabled on the new mtd device
> - put a swapfile on that filesystem and swap to it
Base for this indirection hierarchy is the in-ram mtd device which has problems mentioned above. Also, as amikims pointed out, additional levels of indirection means more overhead.