X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;ds=sidebyside;f=fio.h;h=e11a03902676285635ae5d2e2dc2b60ed83eb401;hb=29ac257cb18a38c20f970bd02f2bfb3a027309d5;hp=b67613e6d10bdcb4309e9df6c14f7dbae9cc2f1e;hpb=b94d4d75a2e474561dcda8ee852cd5e67dde884e;p=fio.git diff --git a/fio.h b/fio.h index b67613e6..e11a0390 100644 --- a/fio.h +++ b/fio.h @@ -59,6 +59,10 @@ #define MPOL_LOCAL MPOL_MAX #endif +#ifdef CONFIG_CUDA +#include +#endif + /* * offset generator types */ @@ -408,6 +412,18 @@ struct thread_data { 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) { - 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,