UMS Device

The UMS device is registered once the kernel module is loaded. It supports three operations: open, ioctl and release.

Open

When the UMS device is opened all required resources are allocated and initialized. In particular the private data of the device points to a local ums_data struct.

Release

When the UMS device is closed all UMS resources that are still present in the ums_data struct are released.

Structs

struct ums_data

UMS device private data.

Public Members

struct idr_l comp_lists

Pool of UMS completion lists

struct rhashtable schedulers

Pool of UMS schedulers

struct rhashtable workers

Pool of UMS workers

struct ums_proc_dirs dirs

Procfs base dirs

Functions

inline int ums_caches_init(void)

Initialize UMS device caches.

Returns

0 in case of success, -ERRNO otherwise

inline void ums_caches_destroy(void)

Destroy UMS device caches.

inline int register_ums_device(void)

Register UMS miscellaneous device.

Returns

0 in case of success, -ERRNO otherwise.

inline void unregister_ums_device(void)

Unregister UMS miscellaneous device.

Returns

0 in case of success, -ERRNO otherwise.

inline int enter_ums_mode(struct ums_data *data, struct enter_ums_mode_args *args)

Enter UMS mode.

Enter UMS mode as a UMS scheduler or a UMS worker depending on args::flags.

Context: Process context. May sleep.

Parameters
  • data[in] pointer to the UMS data

  • args[in] userspace pointer for args

Returns

  • 0 - OK

  • -EACCESS - Bad userspace pointer

  • -ENOMEM - No memory available

  • -EINVAL - Invalid args