]> git.codelabs.ch Git - muen/linux/muenblock.git/summary
 
descriptionMuen SK channel blockdev Linux kernel module
ownerReto Buerki
last changeWed, 5 Apr 2023 14:10:58 +0000 (16:10 +0200)
readme

Muenblock

Introduction

The muenblock Linux kernel module implements a block device driver which transports block I/O requests (bio) via shared memory channels provided by the Muen Separation Kernel.

The server part enables the export of entire block devices or single partitions from a Linux subject to the driver's client part running on another Linux subject.

Note: The muenblock kernel modules are in an experimental state and not yet ready for production use.

Usage

The following command inserts the muenblock-server module into the kernel on the server side. It exports the complete sda disk via the blockdev_request1 and blockdev_response1 channels to the client module.

$ modprobe muenblock-server \
    connections=1:blockdev_request1:blockdev_response1:blockdev_mem \
    device=/dev/sda:1

The connections parameter is defined as a comma separated list of connection strings with the fields:

<connection_id>:<request_shm_name>:<response_shm_name>:<buffer_shm_name>

and optional

<request_shm_protocol>:<response_shm_protocol>

Where connection_id is used to map a device to a connection. It is possible to have multiple devices on a single connection. *_shm_name are reader and writer channels. buffer_shm_name is used as plain shared memory. The reader and writer protocols are arbitrary values which must match between communicating endpoints.

The device parameter is a comma separated list of device to connection mappings:

<block device>:<connection_id>

Where block_device is a existing block device on the server and connection_id must match a connection_id of the connections parameter.

The following command is then executed in the client virtual machine to insert the muenblock-client module:

$ modprobe muenblock-client \
    connections=1:blockdev_request1:blockdev_response1:muenblock

The client only gets the connections parameter which is defined in the same way as for the server.

This leads to the creation of a /dev/muendiska block device on the client which can be used like a directly assigned disk.

It is also possible to only export specific partitions of a block device, see the following two example commands on the server and client respectively:

$ depmod muenblock-server \
    connections=1:blockdev_request1:blockdev_response1:blockdev_mem \
    device=/dev/sda1:1,/dev/sdb5:1

$ depmod muenblock-client \
    connections=1:blockdev_request1:blockdev_response1:blockdev_mem

Each partition will appear as separate muendiska and muendiskb devices in the client.

I/O Scheduler Performance

To increase performance, set the I/O scheduler of the block device exported by the muenblock server module to noop (or none, depending on the kernel version):

# echo noop > /sys/class/block/sda/queue/scheduler

Supported Filesystems

Filesystems of the ext* family have been extensively tested, also in layered modes (ext filesystem on dm-crypt, LVM or both) and are known to work.

shortlog
2023-04-05 Adrian-Ken... Adapt to upstream changes for v6.1 master
2023-01-23 Adrian-Ken... Minor: Some spelling fixes
2022-04-07 Reto BuerkiFix checkpatch warnings
2022-04-07 Reto BuerkiUpdate for kernel 5.15(.32)
2021-09-16 Adrian-Ken... Adapt to upstream change
2020-09-22 Adrian-Ken... Add dummy release functions
2020-09-17 Ralf HubertRewrite for new blockdev interface
2020-04-02 Reto BuerkiAdjustments for sinfo 03
2019-12-20 Adrian-Ken... Add .mod to gitignore
2019-01-28 Reto BuerkiAdjustments for 4.18 kernel
2019-01-28 Reto BuerkiUpdate to Muen sinfo variant resource API
2019-01-28 Reto BuerkiAdjustements for 4.14 kernel
2019-01-28 Dennis WassenbergInitial import of the muenblock Linux kernel module
heads
7 months ago arm64
20 months ago master