mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
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:
+5
-5
@@ -200,7 +200,7 @@ vdev_add_child(vdev_t *pvd, vdev_t *cvd)
|
||||
pvd->vdev_children = MAX(pvd->vdev_children, id + 1);
|
||||
newsize = pvd->vdev_children * sizeof (vdev_t *);
|
||||
|
||||
newchild = kmem_alloc(newsize, KM_PUSHPAGE);
|
||||
newchild = kmem_alloc(newsize, KM_SLEEP);
|
||||
if (pvd->vdev_child != NULL) {
|
||||
bcopy(pvd->vdev_child, newchild, oldsize);
|
||||
kmem_free(pvd->vdev_child, oldsize);
|
||||
@@ -270,7 +270,7 @@ vdev_compact_children(vdev_t *pvd)
|
||||
if (pvd->vdev_child[c])
|
||||
newc++;
|
||||
|
||||
newchild = kmem_zalloc(newc * sizeof (vdev_t *), KM_PUSHPAGE);
|
||||
newchild = kmem_zalloc(newc * sizeof (vdev_t *), KM_SLEEP);
|
||||
|
||||
for (c = newc = 0; c < oldc; c++) {
|
||||
if ((cvd = pvd->vdev_child[c]) != NULL) {
|
||||
@@ -293,7 +293,7 @@ vdev_alloc_common(spa_t *spa, uint_t id, uint64_t guid, vdev_ops_t *ops)
|
||||
vdev_t *vd;
|
||||
int t;
|
||||
|
||||
vd = kmem_zalloc(sizeof (vdev_t), KM_PUSHPAGE);
|
||||
vd = kmem_zalloc(sizeof (vdev_t), KM_SLEEP);
|
||||
|
||||
if (spa->spa_root_vdev == NULL) {
|
||||
ASSERT(ops == &vdev_root_ops);
|
||||
@@ -856,7 +856,7 @@ vdev_metaslab_init(vdev_t *vd, uint64_t txg)
|
||||
|
||||
ASSERT(oldc <= newc);
|
||||
|
||||
mspp = kmem_zalloc(newc * sizeof (*mspp), KM_PUSHPAGE);
|
||||
mspp = kmem_zalloc(newc * sizeof (*mspp), KM_SLEEP);
|
||||
|
||||
if (oldc != 0) {
|
||||
bcopy(vd->vdev_ms, mspp, oldc * sizeof (*mspp));
|
||||
@@ -1011,7 +1011,7 @@ vdev_probe(vdev_t *vd, zio_t *zio)
|
||||
mutex_enter(&vd->vdev_probe_lock);
|
||||
|
||||
if ((pio = vd->vdev_probe_zio) == NULL) {
|
||||
vps = kmem_zalloc(sizeof (*vps), KM_PUSHPAGE);
|
||||
vps = kmem_zalloc(sizeof (*vps), KM_SLEEP);
|
||||
|
||||
vps->vps_flags = ZIO_FLAG_CANFAIL | ZIO_FLAG_PROBE |
|
||||
ZIO_FLAG_DONT_CACHE | ZIO_FLAG_DONT_AGGREGATE |
|
||||
|
||||
Reference in New Issue
Block a user