test/bdev/raid: reduce memory usage for io_waitq unit test
This test allocates ridiculous amounts of memory for certain random seeds. This test doesn't benefit from the extra queue depth, or the larger I/O sizes, so just pick more reasonable numbers that suffice for this unit test. Some of the failing seeds in the test pool resulted in >30GB of total memory allocated, according to valgrind. Eventually we need to remove the randomness from all of the unit tests, but at least this gets us past this intermittent failure. Fixes issue #692. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Ia882fda8ef449c8537f76c878008aaf469ae7bd7 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/448193 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
05085f6645
commit
5a77afa8fb
@ -2072,7 +2072,6 @@ test_io_waitq(void)
|
||||
struct spdk_bdev_io *bdev_io;
|
||||
struct spdk_bdev_io *bdev_io_next;
|
||||
uint32_t count;
|
||||
uint64_t io_len;
|
||||
uint64_t lba;
|
||||
TAILQ_HEAD(, spdk_bdev_io) head_io;
|
||||
|
||||
@ -2109,12 +2108,11 @@ test_io_waitq(void)
|
||||
|
||||
lba = 0;
|
||||
TAILQ_INIT(&head_io);
|
||||
for (count = 0; count < g_max_qd; count++) {
|
||||
for (count = 0; count < 128; count++) {
|
||||
bdev_io = calloc(1, sizeof(struct spdk_bdev_io) + sizeof(struct raid_bdev_io));
|
||||
SPDK_CU_ASSERT_FATAL(bdev_io != NULL);
|
||||
TAILQ_INSERT_TAIL(&head_io, bdev_io, module_link);
|
||||
io_len = (rand() % g_strip_size) + 1;
|
||||
bdev_io_initialize(bdev_io, &pbdev->bdev, lba, io_len, SPDK_BDEV_IO_TYPE_WRITE);
|
||||
bdev_io_initialize(bdev_io, &pbdev->bdev, lba, 8, SPDK_BDEV_IO_TYPE_WRITE);
|
||||
g_bdev_io_submit_status = -ENOMEM;
|
||||
lba += g_strip_size;
|
||||
raid_bdev_submit_request(ch, bdev_io);
|
||||
@ -2123,7 +2121,7 @@ test_io_waitq(void)
|
||||
g_ignore_io_output = 1;
|
||||
|
||||
count = get_num_elts_in_waitq();
|
||||
CU_ASSERT(count == g_max_qd);
|
||||
CU_ASSERT(count == 128);
|
||||
g_bdev_io_submit_status = 0;
|
||||
process_io_waitq();
|
||||
CU_ASSERT(TAILQ_EMPTY(&g_io_waitq));
|
||||
|
Loading…
x
Reference in New Issue
Block a user