Change KM_PUSHPAGE -> KM_SLEEP

By marking DMU transaction processing contexts with PF_FSTRANS
we can revert the KM_PUSHPAGE -> KM_SLEEP changes.  This brings
us back in line with upstream.  In some cases this means simply
swapping the flags back.  For others fnvlist_alloc() was replaced
by nvlist_alloc(..., KM_PUSHPAGE) and must be reverted back to
fnvlist_alloc() which assumes KM_SLEEP.

The one place KM_PUSHPAGE is kept is when allocating ARC buffers
which allows us to dip in to reserved memory.  This is again the
same as upstream.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
Brian Behlendorf
2014-11-20 19:09:39 -05:00
parent efcd79a883
commit 79c76d5b65
65 changed files with 269 additions and 281 deletions
+6 -6
View File
@@ -261,8 +261,8 @@ dsl_scan_setup_sync(void *arg, dmu_tx_t *tx)
/* back to the generic stuff */
if (dp->dp_blkstats == NULL) {
dp->dp_blkstats = kmem_alloc(sizeof (zfs_all_blkstats_t),
KM_PUSHPAGE);
dp->dp_blkstats =
vmem_alloc(sizeof (zfs_all_blkstats_t), KM_SLEEP);
}
bzero(dp->dp_blkstats, sizeof (zfs_all_blkstats_t));
@@ -762,7 +762,7 @@ dsl_scan_visitbp(blkptr_t *bp, const zbookmark_phys_t *zb,
dsl_pool_t *dp = scn->scn_dp;
blkptr_t *bp_toread;
bp_toread = kmem_alloc(sizeof (blkptr_t), KM_PUSHPAGE);
bp_toread = kmem_alloc(sizeof (blkptr_t), KM_SLEEP);
*bp_toread = *bp;
/* ASSERT(pbuf == NULL || arc_released(pbuf)); */
@@ -1059,7 +1059,7 @@ dsl_scan_visitds(dsl_scan_t *scn, uint64_t dsobj, dmu_tx_t *tx)
dmu_buf_will_dirty(ds->ds_dbuf, tx);
dsl_scan_visit_rootbp(scn, ds, &ds->ds_phys->ds_bp, tx);
dsname = kmem_alloc(ZFS_MAXNAMELEN, KM_PUSHPAGE);
dsname = kmem_alloc(ZFS_MAXNAMELEN, KM_SLEEP);
dsl_dataset_name(ds, dsname);
zfs_dbgmsg("scanned dataset %llu (%s) with min=%llu max=%llu; "
"pausing=%u",
@@ -1325,8 +1325,8 @@ dsl_scan_visit(dsl_scan_t *scn, dmu_tx_t *tx)
* bookmark so we don't think that we're still trying to resume.
*/
bzero(&scn->scn_phys.scn_bookmark, sizeof (zbookmark_phys_t));
zc = kmem_alloc(sizeof (zap_cursor_t), KM_PUSHPAGE);
za = kmem_alloc(sizeof (zap_attribute_t), KM_PUSHPAGE);
zc = kmem_alloc(sizeof (zap_cursor_t), KM_SLEEP);
za = kmem_alloc(sizeof (zap_attribute_t), KM_SLEEP);
/* keep pulling things out of the zap-object-as-queue */
while (zap_cursor_init(zc, dp->dp_meta_objset,