mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 19:04:45 +03:00
DLPX-44812 integrate EP-220 large memory scalability
This commit is contained in:
committed by
Brian Behlendorf
parent
616fa7c02b
commit
a6255b7fce
+12
-12
@@ -37,6 +37,7 @@
|
||||
#include <sys/spa.h>
|
||||
#include <sys/spa_impl.h>
|
||||
#include <sys/kstat.h>
|
||||
#include <sys/abd.h>
|
||||
|
||||
/*
|
||||
* ZFS I/O Scheduler
|
||||
@@ -496,12 +497,12 @@ vdev_queue_agg_io_done(zio_t *aio)
|
||||
zio_t *pio;
|
||||
zio_link_t *zl = NULL;
|
||||
while ((pio = zio_walk_parents(aio, &zl)) != NULL) {
|
||||
bcopy((char *)aio->io_data + (pio->io_offset -
|
||||
aio->io_offset), pio->io_data, pio->io_size);
|
||||
abd_copy_off(pio->io_abd, aio->io_abd,
|
||||
0, pio->io_offset - aio->io_offset, pio->io_size);
|
||||
}
|
||||
}
|
||||
|
||||
zio_buf_free(aio->io_data, aio->io_size);
|
||||
abd_free(aio->io_abd);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -523,7 +524,7 @@ vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio)
|
||||
boolean_t stretch = B_FALSE;
|
||||
avl_tree_t *t = vdev_queue_type_tree(vq, zio->io_type);
|
||||
enum zio_flag flags = zio->io_flags & ZIO_FLAG_AGG_INHERIT;
|
||||
void *buf;
|
||||
abd_t *abd;
|
||||
|
||||
limit = MAX(MIN(zfs_vdev_aggregation_limit,
|
||||
spa_maxblocksize(vq->vq_vdev->vdev_spa)), 0);
|
||||
@@ -626,12 +627,12 @@ vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio)
|
||||
size = IO_SPAN(first, last);
|
||||
ASSERT3U(size, <=, limit);
|
||||
|
||||
buf = zio_buf_alloc_flags(size, KM_NOSLEEP);
|
||||
if (buf == NULL)
|
||||
abd = abd_alloc_for_io(size, B_TRUE);
|
||||
if (abd == NULL)
|
||||
return (NULL);
|
||||
|
||||
aio = zio_vdev_delegated_io(first->io_vd, first->io_offset,
|
||||
buf, size, first->io_type, zio->io_priority,
|
||||
abd, size, first->io_type, zio->io_priority,
|
||||
flags | ZIO_FLAG_DONT_CACHE | ZIO_FLAG_DONT_QUEUE,
|
||||
vdev_queue_agg_io_done, NULL);
|
||||
aio->io_timestamp = first->io_timestamp;
|
||||
@@ -644,12 +645,11 @@ vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio)
|
||||
|
||||
if (dio->io_flags & ZIO_FLAG_NODATA) {
|
||||
ASSERT3U(dio->io_type, ==, ZIO_TYPE_WRITE);
|
||||
bzero((char *)aio->io_data + (dio->io_offset -
|
||||
aio->io_offset), dio->io_size);
|
||||
abd_zero_off(aio->io_abd,
|
||||
dio->io_offset - aio->io_offset, dio->io_size);
|
||||
} else if (dio->io_type == ZIO_TYPE_WRITE) {
|
||||
bcopy(dio->io_data, (char *)aio->io_data +
|
||||
(dio->io_offset - aio->io_offset),
|
||||
dio->io_size);
|
||||
abd_copy_off(aio->io_abd, dio->io_abd,
|
||||
dio->io_offset - aio->io_offset, 0, dio->io_size);
|
||||
}
|
||||
|
||||
zio_add_child(dio, aio);
|
||||
|
||||
Reference in New Issue
Block a user