projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'wip-remove-disconnect' of https://github.com/liupan1111/fio
[fio.git]
/
fio.h
diff --git
a/fio.h
b/fio.h
index b67613e6d10bdcb4309e9df6c14f7dbae9cc2f1e..e11a03902676285635ae5d2e2dc2b60ed83eb401 100644
(file)
--- a/
fio.h
+++ b/
fio.h
@@
-59,6
+59,10
@@
#define MPOL_LOCAL MPOL_MAX
#endif
#define MPOL_LOCAL MPOL_MAX
#endif
+#ifdef CONFIG_CUDA
+#include <cuda.h>
+#endif
+
/*
* offset generator types
*/
/*
* offset generator types
*/
@@
-408,6
+412,18
@@
struct thread_data {
struct steadystate_data ss;
char verror[FIO_VERROR_SIZE];
struct steadystate_data ss;
char verror[FIO_VERROR_SIZE];
+
+#ifdef CONFIG_CUDA
+ /*
+ * for GPU memory management
+ */
+ int gpu_dev_cnt;
+ int gpu_dev_id;
+ CUdevice cu_dev;
+ CUcontext cu_ctx;
+ CUdeviceptr dev_mem_ptr;
+#endif
+
};
/*
};
/*
@@
-580,7
+596,8
@@
static inline enum fio_ioengine_flags td_ioengine_flags(struct thread_data *td)
static inline void td_set_ioengine_flags(struct thread_data *td)
{
static inline void td_set_ioengine_flags(struct thread_data *td)
{
- td->flags |= (td->io_ops->flags << TD_ENG_FLAG_SHIFT);
+ td->flags = (~(TD_ENG_FLAG_MASK << TD_ENG_FLAG_SHIFT) & td->flags) |
+ (td->io_ops->flags << TD_ENG_FLAG_SHIFT);
}
static inline bool td_ioengine_flagged(struct thread_data *td,
}
static inline bool td_ioengine_flagged(struct thread_data *td,