vdev_queue.c revision c33e334fd3eb2b3d91c4b9667d7a465b6924e8d3
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <sys/zfs_context.h>
#include <sys/spa_impl.h>
#include <sys/vdev_impl.h>
/*
* These tunables are for performance analysis.
*/
/*
* pending to each device. zfs_vdev_min_pending is the initial number
* max_pending).
*/
int zfs_vdev_max_pending = 10;
int zfs_vdev_min_pending = 4;
/* deadline = pri + (lbolt >> time_shift) */
int zfs_vdev_time_shift = 6;
/* exponential I/O issue ramp-up rate */
int zfs_vdev_ramp_rate = 2;
/*
* they aren't able to help us aggregate at this level.
*/
/*
* Virtual device vector for disk I/O scheduling.
*/
int
{
return (-1);
return (1);
return (-1);
return (1);
return (-1);
return (1);
return (0);
}
int
{
return (-1);
return (1);
return (-1);
return (1);
return (0);
}
void
{
}
void
{
}
static void
{
}
static void
{
}
static void
{
}
/*
* (lio->io_offset + lio->io_size) minus start of the first (fio->io_offset).
* Conveniently, the gap between fio and lio is given by -IO_SPAN(lio, fio);
* thus fio and lio are adjacent if and only if IO_SPAN(lio, fio) == 0.
*/
static zio_t *
{
avl_tree_t *t;
int flags;
int stretch;
return (NULL);
t = fio->io_vdev_tree;
if (!(flags & ZIO_FLAG_DONT_AGGREGATE)) {
/*
* the same flavor, as expressed by the AGG_INHERIT flags.
* The latter requirement is necessary so that certain
* attributes of the I/O, such as whether it's a normal I/O
* to begin a range as they add no benefit in that situation.
*/
/*
* We keep track of the last non-optional I/O.
*/
/*
* recording the last non-option I/O.
*/
}
/*
*/
}
/*
*/
}
/*
* Now that we've established the range of the I/O aggregation
* For reads, there's nothing to do. While we are unable to
* aggregate further, it's possible that a trailing optional
* I/O would allow the underlying device to aggregate with
* non-optional I/O is close enough to make aggregation
* worthwhile.
*/
break;
}
}
}
if (stretch) {
/* This may be a no-op. */
} else {
}
}
}
do {
}
return (aio);
}
/*
* If the I/O is or was optional and therefore has no data, we need to
* simply discard it. We need to drop the vdev queue's lock to avoid a
* deadlock that we could encounter since this I/O will complete
* immediately.
*/
goto again;
}
return (fio);
}
zio_t *
{
return (zio);
else
return (NULL);
return (NULL);
}
return (nio);
}
void
{
for (int i = 0; i < zfs_vdev_ramp_rate; i++) {
break;
} else {
}
}
}