Recent changes (master)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The following changes since commit e0224c6bd115b0decd4f330fa8ff43f5e0cc6811:

  Fix bug with rate and read/write mixed workloads at 100% bias (2013-02-07 19:55:24 +0100)

are available in the git repository at:
  git://git.kernel.dk/fio.git master

Bruce Cran (1):
      Windows: io cancellation often fails and causes crashes, so remove it.

Jens Axboe (1):
      Fix rate limiting

 engines/windowsaio.c |   28 ----------------------------
 io_u.c               |    4 ++--
 2 files changed, 2 insertions(+), 30 deletions(-)

---

Diff of recent changes:

diff --git a/engines/windowsaio.c b/engines/windowsaio.c
index 3a24fa7..f32c356 100644
--- a/engines/windowsaio.c
+++ b/engines/windowsaio.c
@@ -28,7 +28,6 @@ struct windowsaio_data {
 	HANDLE iocp;
 	HANDLE iothread;
 	HANDLE iocomplete_event;
-	CANCELIOEX pCancelIoEx;
 	BOOL iothread_running;
 };
 
@@ -37,8 +36,6 @@ struct thread_ctx {
 	struct windowsaio_data *wd;
 };
 
-static int fio_windowsaio_cancel(struct thread_data *td,
-				   struct io_u *io_u);
 static BOOL timeout_expired(DWORD start_count, DWORD end_count);
 static int fio_windowsaio_getevents(struct thread_data *td, unsigned int min,
 					unsigned int max, struct timespec *t);
@@ -54,7 +51,6 @@ static int fio_windowsaio_close_file(struct thread_data fio_unused *td, struct f
 static int fio_windowsaio_init(struct thread_data *td)
 {
 	struct windowsaio_data *wd;
-	HANDLE hKernel32Dll;
 	int rc = 0;
 
 	wd = calloc(1, sizeof(struct windowsaio_data));
@@ -89,8 +85,6 @@ static int fio_windowsaio_init(struct thread_data *td)
 		}
 	}
 
-	hKernel32Dll = GetModuleHandle("kernel32.dll");
-	wd->pCancelIoEx = (CANCELIOEX)GetProcAddress(hKernel32Dll, "CancelIoEx");
 	td->io_ops->data = wd;
 
 	if (!rc) {
@@ -402,27 +396,6 @@ static DWORD WINAPI IoCompletionRoutine(LPVOID lpParameter)
 	return 0;
 }
 
-static int fio_windowsaio_cancel(struct thread_data *td,
-				   struct io_u *io_u)
-{
-	int rc = 0;
-
-	struct windowsaio_data *wd = td->io_ops->data;
-
-	/* If we're running on Vista or newer, we can cancel individual IO requests */
-	if (wd->pCancelIoEx != NULL) {
-		struct fio_overlapped *ovl = io_u->engine_data;
-
-		if (!wd->pCancelIoEx(io_u->file->hFile, &ovl->o)) {
-			log_err("windowsaio: failed to cancel io\n");
-			rc = 1;
-		}
-	} else
-		rc = 1;
-
-	return rc;
-}
-
 static void fio_windowsaio_io_u_free(struct thread_data *td, struct io_u *io_u)
 {
 	struct fio_overlapped *o = io_u->engine_data;
@@ -457,7 +430,6 @@ static struct ioengine_ops ioengine = {
 	.version	= FIO_IOOPS_VERSION,
 	.init		= fio_windowsaio_init,
 	.queue		= fio_windowsaio_queue,
-	.cancel		= fio_windowsaio_cancel,
 	.getevents	= fio_windowsaio_getevents,
 	.event		= fio_windowsaio_event,
 	.cleanup	= fio_windowsaio_cleanup,
diff --git a/io_u.c b/io_u.c
index 6598881..1013c7f 100644
--- a/io_u.c
+++ b/io_u.c
@@ -490,14 +490,14 @@ static enum fio_ddir rate_ddir(struct thread_data *td, enum fio_ddir ddir)
 
 	assert(ddir_rw(ddir));
 
-	if (td->rate_pending_usleep[ddir] <= 0 || !td->o.rwmix[odir])
+	if (td->rate_pending_usleep[ddir] <= 0)
 		return ddir;
 
 	/*
 	 * We have too much pending sleep in this direction. See if we
 	 * should switch.
 	 */
-	if (td_rw(td)) {
+	if (td_rw(td) && td->o.rwmix[odir]) {
 		/*
 		 * Other direction does not have too much pending, switch
 		 */
--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux