README 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. liburing
  2. --------
  3. This is the io_uring library, liburing. liburing provides helpers to setup and
  4. teardown io_uring instances, and also a simplified interface for
  5. applications that don't need (or want) to deal with the full kernel
  6. side implementation.
  7. For more info on io_uring, please see:
  8. https://kernel.dk/io_uring.pdf
  9. Subscribe to io-uring@vger.kernel.org for io_uring related discussions
  10. and development for both kernel and userspace. The list is archived here:
  11. https://lore.kernel.org/io-uring/
  12. kernel version dependency
  13. --------------------------
  14. liburing itself is not tied to any specific kernel release, and hence it's
  15. possible to use the newest liburing release even on older kernels (and vice
  16. versa). Newer features may only be available on more recent kernels,
  17. obviously.
  18. ulimit settings
  19. ---------------
  20. io_uring accounts memory it needs under the rlimit memlocked option, which
  21. can be quite low on some setups (64K). The default is usually enough for
  22. most use cases, but bigger rings or things like registered buffers deplete
  23. it quickly. root isn't under this restriction, but regular users are. Going
  24. into detail on how to bump the limit on various systems is beyond the scope
  25. of this little blurb, but check /etc/security/limits.conf for user specific
  26. settings, or /etc/systemd/user.conf and /etc/systemd/system.conf for systemd
  27. setups. This affects 5.11 and earlier, new kernels are less dependent
  28. on RLIMIT_MEMLOCK as it is only used for registering buffers.
  29. Regressions tests
  30. -----------------
  31. The bulk of liburing is actually regression/unit tests for both liburing and
  32. the kernel io_uring support. Please note that this suite isn't expected to
  33. pass on older kernels, and may even crash or hang older kernels!
  34. Building liburing
  35. -----------------
  36. #
  37. # Prepare build config (optional).
  38. #
  39. # --cc specifies the C compiler.
  40. # --cxx speficies the C++ compiler.
  41. #
  42. ./configure --cc=gcc --cxx=g++;
  43. #
  44. # Build liburing.
  45. #
  46. make -j$(nproc);
  47. #
  48. # Install liburing (headers, shared/static libs, and manpage).
  49. #
  50. sudo make install;
  51. See './configure --help' for more information about build config options.
  52. FFI support
  53. -----------
  54. By default, the build results in 4 lib files:
  55. 2 shared libs:
  56. liburing.so
  57. liburing-ffi.so
  58. 2 static libs:
  59. liburing.a
  60. liburing-ffi.a
  61. Languages and applications that can't use 'static inline' functions in
  62. liburing.h should use the FFI variants.
  63. liburing's main public interface lives in liburing.h as 'static inline'
  64. functions. Users wishing to consume liburing purely as a binary dependency
  65. should link against liburing-ffi. It contains definitions for every 'static
  66. inline' function.
  67. License
  68. -------
  69. All software contained within this repo is dual licensed LGPL and MIT, see
  70. COPYING and LICENSE, except for a header coming from the kernel which is
  71. dual licensed GPL with a Linux-syscall-note exception and MIT, see
  72. COPYING.GPL and <https://spdx.org/licenses/Linux-syscall-note.html>.
  73. Jens Axboe 2022-05-19