Include zero-copy logging kernel module 56/279256/16
authorArkadiusz Nowak <a.nowak3@samsung.com>
Tue, 21 Jun 2022 11:14:50 +0000 (13:14 +0200)
committerArkadiusz Nowak <a.nowak3@samsung.com>
Fri, 26 Aug 2022 12:32:26 +0000 (14:32 +0200)
commita5393d58408e5be4b6bb5c26ca96a53175d22fee
treebdd2b8faf29f28ddca14d967098b3598ba7da911
parentf842c60eed951c0aa0b56510b6b9bce31318354c
Include zero-copy logging kernel module

This is basically borrowed from the Tizen TV, where the kernel module
was called vlog. Hence the attribution in the MODULE_AUTHOR field. In
our version, the module is called zlogger instead. There is also a
number of changes from the original:

- we support direct writing to the module (similar to the stdout
  redirection support in the logger module), which includes the write
  operation, various ioctl commands and the test vlog_stdout program,
- the thread block table (g_threads) works slightly differently. It is
  no longer a table, but a hashtable. This also removes a limitation on
  the max TID (previously such a limitation has been needed, as the
  table was indexed using the TID),
- the thread block table is no longer mmapable. Instead, the userspace
  is supposed to cache the received block number using thread-local
  storage, and check if it still has the block by verifying the TID
  field in the block header, which is reset when the block is lost.

Change-Id: Ia04f1add0a4904bfd92b156022c704bc62495931
include/uapi/linux/zlogger.h [new file with mode: 0644]
kernel/Makefile
kernel/zlogger/Makefile [new file with mode: 0644]
kernel/zlogger/zlogger.c [new file with mode: 0644]
packaging/linux-tizen-modules-source.spec
tests/zlog_stdout/Makefile [new file with mode: 0644]
tests/zlog_stdout/zlog_stdout.c [new file with mode: 0644]