]> granicus.if.org Git - zfs/commitdiff
No inline to keep dmu_recv_stream() stack frame less than 1024 bytes.
authorBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 18 Dec 2009 22:22:02 +0000 (14:22 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 18 Dec 2009 22:22:02 +0000 (14:22 -0800)
Recent builds against 2.6.31 flagged dmu_recv_stream() as stack heavy.
As a quick simple way to resolve this I'm preventing the inlining of
certain functions which gcc will inline here because this is the only
place they are called.  Futher analysis of this function should be
performed to futher reduce its stack usage.

module/zfs/dmu_send.c

index ce59aac5088f91d71aade2b7df0efbec9fa7e978..266f35ad983e6b826b75f7c8c54af259778e6bf4 100644 (file)
@@ -689,7 +689,7 @@ restore_read(struct restorearg *ra, int len)
        return (rv);
 }
 
-static void
+noinline static void
 backup_byteswap(dmu_replay_record_t *drr)
 {
 #define        DO64(X) (drr->drr_u.X = BSWAP_64(drr->drr_u.X))
@@ -740,7 +740,7 @@ backup_byteswap(dmu_replay_record_t *drr)
 #undef DO32
 }
 
-static int
+noinline static int
 restore_object(struct restorearg *ra, objset_t *os, struct drr_object *drro)
 {
        int err;
@@ -822,7 +822,7 @@ restore_object(struct restorearg *ra, objset_t *os, struct drr_object *drro)
 }
 
 /* ARGSUSED */
-static int
+noinline static int
 restore_freeobjects(struct restorearg *ra, objset_t *os,
     struct drr_freeobjects *drrfo)
 {
@@ -846,7 +846,7 @@ restore_freeobjects(struct restorearg *ra, objset_t *os,
        return (0);
 }
 
-static int
+noinline static int
 restore_write(struct restorearg *ra, objset_t *os,
     struct drr_write *drrw)
 {
@@ -883,7 +883,7 @@ restore_write(struct restorearg *ra, objset_t *os,
 }
 
 /* ARGSUSED */
-static int
+noinline static int
 restore_free(struct restorearg *ra, objset_t *os,
     struct drr_free *drrf)
 {