Announcement

Collapse
No announcement yet.

Linux Kernel Power Management Targeting Memory

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Originally posted by schmidtbag View Post
    That depends on your purpose, but generally speaking tmpfs is safer to use and makes more sense as a RAM drive. It'd be nice if there was a way to prevent tmpfs from accessing swap, but I personally never use swap so I guess I don't have much to worry about.
    The explanation I've heard is that tmpfs is just the disk cache, presented as a filesystem.
    Of course, caching in swap is rather pointless, though perhaps not entirely.

    Comment


    • #17
      Originally posted by Ibidem View Post
      The explanation I've heard is that tmpfs is just the disk cache, presented as a filesystem.
      Of course, caching in swap is rather pointless, though perhaps not entirely.
      I'm not sure about that.... you can mount a tmpfs to any location you want and of any size you want. It is a RAM filesystem, it just doesn't dynamically expand like ramfs. I'm not sure of any simple way to directly access disk cache - it sounds like a severe security flaw to me.

      Comment


      • #18
        Originally posted by schmidtbag View Post
        I'm not sure about that.... you can mount a tmpfs to any location you want and of any size you want. It is a RAM filesystem, it just doesn't dynamically expand like ramfs. I'm not sure of any simple way to directly access disk cache - it sounds like a severe security flaw to me.
        1: Sorry for the unclear wording: it is not the cache of another filesystem, but a "filesystem" backed only by RAM used by the disk caching code, as if you had a cache for another filesystem, but no file or device to back that:
        Originally posted by Documentation/fs/tmpfs.txt
        tmpfs puts everything into the kernel internal caches and grows and
        shrinks to accommodate the files it contains and is able to swap
        unneeded pages out to swap space. It has maximum size limits which can
        be adjusted on the fly via 'mount -o remount ...'
        2: It does dynamically expand, as written above. But it has limits. And that and whether it can swap are the main difference from ramfs. (ramfs does not swap.)

        (If you want a _good_ explanation, refer to the document within the kernel source tree having the name mentioned...)
        Last edited by Ibidem; 04-13-2013, 10:23 PM.

        Comment

        Working...
        X