projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Drop obsolete comment on a race condition
[fio.git]
/
backend.c
diff --git
a/backend.c
b/backend.c
index 4570d8d5e601a450fb54d757c980edb17009cfd3..1c1f2f9a1e603c084160165eb6596945de344d7a 100644
(file)
--- a/
backend.c
+++ b/
backend.c
@@
-76,9
+76,6
@@
int shm_id = 0;
int temp_stall_ts;
unsigned long done_secs = 0;
int temp_stall_ts;
unsigned long done_secs = 0;
-#define PAGE_ALIGN(buf) \
- (char *) (((uintptr_t) (buf) + page_mask) & ~page_mask)
-
#define JOB_START_TIMEOUT (5 * 1000)
static void sig_int(int sig)
#define JOB_START_TIMEOUT (5 * 1000)
static void sig_int(int sig)
@@
-1198,7
+1195,7
@@
static int init_io_u(struct thread_data *td)
if (td->o.odirect || td->o.mem_align || td->o.oatomic ||
td_ioengine_flagged(td, FIO_RAWIO))
if (td->o.odirect || td->o.mem_align || td->o.oatomic ||
td_ioengine_flagged(td, FIO_RAWIO))
- p = P
AGE_ALIGN(td->orig_buffer
) + td->o.mem_align;
+ p = P
TR_ALIGN(td->orig_buffer, page_mask
) + td->o.mem_align;
else
p = td->orig_buffer;
else
p = td->orig_buffer;
@@
-1264,6
+1261,10
@@
static int init_io_u(struct thread_data *td)
return 0;
}
return 0;
}
+/*
+ * This function is Linux specific.
+ * FIO_HAVE_IOSCHED_SWITCH enabled currently means it's Linux.
+ */
static int switch_ioscheduler(struct thread_data *td)
{
#ifdef FIO_HAVE_IOSCHED_SWITCH
static int switch_ioscheduler(struct thread_data *td)
{
#ifdef FIO_HAVE_IOSCHED_SWITCH
@@
-1274,7
+1275,8
@@
static int switch_ioscheduler(struct thread_data *td)
if (td_ioengine_flagged(td, FIO_DISKLESSIO))
return 0;
if (td_ioengine_flagged(td, FIO_DISKLESSIO))
return 0;
- sprintf(tmp, "%s/queue/scheduler", td->sysfs_root);
+ assert(td->files && td->files[0]);
+ sprintf(tmp, "%s/queue/scheduler", td->files[0]->du->sysfs_root);
f = fopen(tmp, "r+");
if (!f) {
f = fopen(tmp, "r+");
if (!f) {
@@
-1362,7
+1364,7
@@
static bool keep_running(struct thread_data *td)
uint64_t diff;
/*
uint64_t diff;
/*
- * If the difference is less than the m
in
imum IO size, we
+ * If the difference is less than the m
ax
imum IO size, we
* are done.
*/
diff = limit - ddir_rw_sum(td->io_bytes);
* are done.
*/
diff = limit - ddir_rw_sum(td->io_bytes);