Re: [RFC] [PATCH] VM & VFS changes

From: Andre Guibert de Bruet (andy_at_siliconlandmark.com)
Date: 06/02/05

  • Next message: alan bryan: "Re: nForce 4, SATA Drive only runs at UDMA33?"
    Date: Thu, 2 Jun 2005 10:04:43 -0400 (EDT)
    To: Alexander Leidinger <Alexander@Leidinger.net>
    
    

    On Thu, 2 Jun 2005, Alexander Leidinger wrote:
    > Don Lewis <truckman@FreeBSD.org> wrote:
    >
    >>> What am I overlooking?
    >>
    >> Create a large, but nearly empty file system, /a
    > ^
    > memory/swap based
    >
    >> Mount a file system backed by a physical disk on /a/b
    >> Create the file /a/b/c and configure it to be used as swap
    >> Write a large amount of data to the file /a/d, which will overflow RAM
    >> and be paged out to /a/b/c
    >>
    >> It won't be possible to disable swapping to /a/b/c because there is not
    >> sufficient RAM to page in the data stored there. It won't be possible
    >> to unmount /a/b because /a/b/c is busy. It won't be possible to unmount
    >> /a because it is busy because /a/b is mounted on it.
    >
    > Ah! Yes! I tend to forget this is possible. In my mind a memory/swap based FS
    > as a "leaf" in the directory tree... or more correctly, the subtree below the
    > memory/swap based FS isn't allowed to contain a mointpoint of a non
    > memory/swap based FS. Any other use which may require to break this rule has
    > to use symlinks instead and isn't allowed to break the rule.
    >
    > This helps to avoid some pitfalls.
    >
    >> If the dependencies are tracked so that this configuration (swapping to
    >> anything that is directly or indirectly dependent on a swap-backed file
    >> system) can be forbidden, then either the algorithm that I suggested, or
    >
    > I'm not sure if we should enforce this policy... I like it, but I think such
    > a restriction should be configurable via sysctl (enabled by default).
    >
    >> your iterative algorithm should work. Your algorithm could even be
    >> simplified by pulling the swap-off out of the loop.
    >>
    >> unconfigure md's that are not busy
    >> do {
    >> foreach filesystem in reverse(mountlist) {
    >> unmount filesystem
    >> if (success and backed by md)
    >> unconfigure md /* either swap or vnode backed */
    >> }
    >> } while (progress)
    >> swap-off
    >> do {
    >> foreach filesystem in reverse(mountlist) {
    >> unmount filesystem
    >> if (success and backed by md)
    >> unconfigure md /* only vnode backed remain */
    >> }
    >> } while (progress)
    >>
    >> Removing the swap-off from the loop may avoid a lot of paging activity
    >> because all the paged-out data from swap backed md's will be discarded
    >> before swap is disabled.
    >
    > Sounds even better.

    I will try to produce patches tonight for this. Stay tuned!

    Cheers!
    Andy

    /* Andre Guibert de Bruet * 6f43 6564 7020 656f 2e74 4220 7469 6a20 */
    /* Code poet / Sysadmin * 636f 656b 2e79 5320 7379 6461 696d 2e6e */
    /* GSM: +1 734 846 8758 * 5520 494e 2058 6c73 7565 6874 002e 0000 */
    /* WWW: siliconlandmark.com * Tormenting bytes since 1980. */

    _______________________________________________
    freebsd-current@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-current
    To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"


  • Next message: alan bryan: "Re: nForce 4, SATA Drive only runs at UDMA33?"

    Relevant Pages

    • Re: Newbie question(s)...
      ... Your proposed algorithm needs to execute on a computing ... symbols in the tape alphabet. ... The configuration history depends on the ... non-repeating strings. ...
      (sci.crypt)
    • Re: implementation dilema
      ... Rather than seeing A, B, and C, you should probably have an Algorithm ... The Algorithm interface will be implemented by all the various ... Configuration configuration = getConfiguration; ... Should AlgorithmSequence be a factory or is it AlgorithmInterface? ...
      (comp.object)
    • Re: implementation dilema
      ... A and B sends result from the algorithm to C. ... For instance (algorithm_ab1/ab2/ab4 is comprised of an FFT, ... interface and a Data interface. ... Configuration configuration = getConfiguration; ...
      (comp.object)