RE: [PATCH] Fio's initial RTEMS port

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

 




> -----Original Message-----
> From: fio-owner@xxxxxxxxxxxxxxx [mailto:fio-owner@xxxxxxxxxxxxxxx] On Behalf Of dev.madaari@xxxxxxxxx
> Sent: Monday, July 16, 2018 4:07 AM
> To: fio@xxxxxxxxxxxxxxx
> Cc: Udit kumar agarwal <dev.madaari@xxxxxxxxx>
> Subject: [PATCH] Fio's initial RTEMS port
> 
> From: Udit kumar agarwal <dev.madaari@xxxxxxxxx>
> 
...
> diff --git a/os/rtems/rtems-fio-wrap.h b/os/rtems/rtems-fio-wrap.h
> new file mode 100644
> index 0000000..2c639cb
> --- /dev/null
> +++ b/os/rtems/rtems-fio-wrap.h
> @@ -0,0 +1,54 @@
> +/* RTEMS specific wrapper for explicitly calling constructors and
> + * destructors */
> +
> +void act_register(void);
> +void tiobench_register(void);
> +void fio_syncio_register(void);
> +void fio_filecreate_register(void);
> +void fio_null_register(void);
> +void prio_tree_init(void);
> +void fio_syncio_register_ft(void);
> +void fio_client_hash_init(void);
> +void fio_syncio_unregister(void);
> +void tiobench_unregister(void);
> +void fio_filecreate_unregister(void);
> +void fio_null_unregister(void);
> +void act_unregister(void);
> +void fio_syncio_unregister_ft(void);
> +

This new wrapper for fio's main():

> +static int
> +mainwrapper(int argc, char *argv[])
> +{
> +	int err=0;
> +
> +	/* Constructors */
> +	act_register();
> +	tiobench_register();
> +	fio_syncio_register();
> +	fio_filecreate_register();
> +	fio_null_register();
> +	prio_tree_init();
> +	fio_syncio_register_ft();
> +	fio_client_hash_init();
> +
> +	err = main(argc, argv, (char *)NULL);
> +
> +	/* Destructors */
> +	fio_syncio_unregister();
> +	tiobench_unregister();
> +	fio_filecreate_unregister();
> +	fio_null_unregister();
> +	act_unregister();
> +	fio_syncio_unregister_ft();
> +
> +	return err;
> +}
> +

and a bunch of these changes to the profile and engine source code
exposing the register and unregister functions so the wrapper can
call them:

> -static void fio_init act_register(void)
> +#ifdef __rtems__
> +void
> +#else /* __rtems__ */
> +static void fio_init
> +#endif /* __rtems__ */
> +act_register(void)

are a bit awkward.

fio's main() calls initialize_fio() which calls arch_init() and
other functions, and add_job() initializes the profiles and
engines needed by the job.  Any reason that flow doesn't work
in the RTEMS environment?


---
Robert Elliott, HPE Persistent Memory


--
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