Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-16746

Convert tracefile to export debug logs via character device

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • None
    • 9223372036854775807

    Description

      Currently the interface provided by the libcfs tracing and debug framework works in a way that makes it challenging for userspace tools to consume the debug log:

      • Past logs are not exported in chronological order but instead are sorted by CPU, meaning that user tools (like "lctl dk") have to sort messages before displaying them.
      • Logs are exported by having kernel threads write to regular files which are then opened and read by user tools. This is an extra step that could be eliminated by having a character device which returns logs directly when read from.

      These aspects make new usability features, for example the ability to "follow" the debug log like "dmesg -w", challenging to implement.

      Changing the tracefile interface to work like Linux's "/dev/kmsg" interface would make it simpler to improve Lustre's debugging tools.

      The biggest challenge is that currently Lustre stores messages in separate per-CPU and per-context buffers. Thus any tool that prints out previously written messages has to sort them. If this is implemented as a character device, that sorting would have to happen in a kernel thread.

      Therefore, this will be much simpler to implement after LU-14428: "Convert tracefile to use ring_buffer from linux".

      Attachments

        Issue Links

          Activity

            People

              wc-triage WC Triage
              bertschinger Thomas Bertschinger
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: