group,

        at least one location:

        When adding a new dva node into the tree, a kmem_alloc is done with
        a KM_SLEEP argument.

        thus, this process thread could block waiting for memory.

        I would suggest adding a  pre-allocated pool of dva nodes.

        When a new dva node is needed, first check this pre-allocated
        pool and allocate from their.

        Why? This would eliminate a possible sleep condition if memory
             is not immediately available. The pool would add a working
             set of dva nodes that could be monitored. Per alloc latencies
             could be amortized over a chunk allocation.

             Lastly, if memory is scarce along time may pass before
             this node could be allocated to the tree. If the number
             is monitored, it is possible that restricted operations
             could be done while until the intent log is decreased in
             size.

        I can supply untested code within 24 hours if wanted.

        Mitchell Erblich
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to