lp:~lttng/lttng-modules/trunk

Created by Ubuntu LTTng and last modified
Get this branch:
bzr branch lp:~lttng/lttng-modules/trunk

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Ubuntu LTTng
Project:
lttng-modules
Status:
Development

Import details

Import Status: Reviewed

This branch is an import of the HEAD branch of the Git repository at https://git.lttng.org/lttng-modules.git.

The next import is scheduled to run .

Last successful import was .

Import started on juju-98ee42-prod-launchpad-codeimport-1 and finished taking 15 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-0 and finished taking 15 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-5 and finished taking 15 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-5 and finished taking 10 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-3 and finished taking 15 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-3 and finished taking 15 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-3 and finished taking 10 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-2 and finished taking 15 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-0 and finished taking 10 seconds — see the log
Import started on juju-98ee42-prod-launchpad-codeimport-0 and finished taking 10 seconds — see the log

Recent revisions

2104. By Kienan Stewart

Fix: Set CTF version in metadata packet headers for CTF2

Observed issue
==============

When tracing with a session configured to use CTF2, the metadata
packet header still contains CTF major 1 and minor 8.

Solution
========

Use the session's configured output format to decide the values to set.

Known drawbacks
==============

None.

Change-Id: I2e8bbfd5e91c50bd5e557b371cc0fdc6d3f92bf3
Signed-off-by: Kienan Stewart <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

2103. By Michael Jeanson <email address hidden>

fix: always print to kernel log on module load failure

Change-Id: I1c52c926e340eef7de0836c5169c2d58a6ac7fee
Signed-off-by: Michael Jeanson <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

2102. By Michael Jeanson <email address hidden>

fix: get_pfnblock_flags_mask / get_pfnblock_migratetype wrappers for v6.17

* Add a version gate for the get_pfnblock_flags_mask wrapper as the
  symbol was removed in v6.17 and thus initialization would always fail
  preventing the modules load.
* Add missing initialization of the get_pfnblock_migratetype wrapper

Change-Id: I5ab3babade87ca501018d91ea2fd04239b9e5d27
Signed-off-by: Michael Jeanson <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

2101. By Michael Jeanson <email address hidden>

fix: remove duplicated MODULE macros

The lttng-tracer.ko module has multiple source files defining the
'MODULE_' macros resulting in duplicated metadata in the modinfo. Keep
only one set of macros in 'src/lttng-events.c'.

Change-Id: I55c2b9ee48956b7759db23073fac1babd8894c3d
Signed-off-by: Michael Jeanson <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

2100. By Kienan Stewart

Fix: Add wrapper for `get_pfnblock_migatetype`

As of Linux v6.17, lttng-modules builds fail with the following error:

```
MODPOST Module.symvers
ERROR: modpost: "get_pfnblock_migratetype" [probes/lttng-probe-kmem.ko] undefined!
make[4]: *** [linux/v6.17/sources/scripts/Makefile.modpost:147: Module.symvers] Error 1
```

The `get_pageblock_migratetype` macro has changed to use
`get_pfnblock_migratetype` rather than `get_pfnblock_flags_mask`.

See upstream commit 42f46ed99ac6c07adf7f3bcbe9040b0c52d62d0f

    commit 42f46ed99ac6c07adf7f3bcbe9040b0c52d62d0f
    Author: Zi Yan <email address hidden>
    Date: Mon Jun 16 22:11:09 2025 -0400

        mm/page_alloc: pageblock flags functions clean up

        Patch series "Make MIGRATE_ISOLATE a standalone bit", v10.

        This patchset moves MIGRATE_ISOLATE to a standalone bit to avoid being
        overwritten during pageblock isolation process. Currently,
        MIGRATE_ISOLATE is part of enum migratetype (in include/linux/mmzone.h),
        thus, setting a pageblock to MIGRATE_ISOLATE overwrites its original
        migratetype. This causes pageblock migratetype loss during
        alloc_contig_range() and memory offline, especially when the process fails
        due to a failed pageblock isolation and the code tries to undo the
        finished pageblock isolations.

        In terms of performance for changing pageblock types, no performance
        change is observed:

        1. I used perf to collect stats of offlining and onlining all memory
           of a 40GB VM 10 times and see that get_pfnblock_flags_mask() and
           set_pfnblock_flags_mask() take about 0.12% and 0.02% of the whole
           process respectively with and without this patchset across 3 runs.

        2. I used perf to collect stats of dd from /dev/random to a 40GB tmpfs
           file and find get_pfnblock_flags_mask() takes about 0.05% of the
           process with and without this patchset across 3 runs.

        This patch (of 6):

        No functional change is intended.

        1. Add __NR_PAGEBLOCK_BITS for the number of pageblock flag bits and use
           roundup_pow_of_two(__NR_PAGEBLOCK_BITS) as NR_PAGEBLOCK_BITS to take
           right amount of bits for pageblock flags.
        2. Rename PB_migrate_skip to PB_compact_skip.
        3. Add {get,set,clear}_pfnblock_bit() to operate one a standalone bit,
           like PB_compact_skip.
        3. Make {get,set}_pfnblock_flags_mask() internal functions and use
           {get,set}_pfnblock_migratetype() for pageblock migratetype operations.
        4. Move pageblock flags common code to get_pfnblock_bitmap_bitidx().
        3. Use MIGRATETYPE_MASK to get the migratetype of a pageblock from its
           flags.
        4. Use PB_migrate_end in the definition of MIGRATETYPE_MASK instead of
           PB_migrate_bits.
        5. Add a comment on is_migrate_cma_folio() to prevent one from changing it
           to use get_pageblock_migratetype() and causing issues.

Change-Id: I81bc8e4384e57e805621fa4d2c12d0d0f17758b3
Signed-off-by: Kienan Stewart <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

2099. By Mathieu Desnoyers

Fix: Protect syscall probes with preemption disable

Since kernel v6.13, the syscall tracepoints call the probes from
faultable context (with preemption enabled).

Adapt to this change to ensure that the LTTng-modules per-cpu data
structures that expect preemption to be disabled don't get corrupted.

This has been noticed through a linked list corruption of the
lttng-tp-mempool per-cpu allocator.

This only affects preemptible kernel configurations (PREEMPT,
PREEMPT_LAZY).

Non-preemptible kernel configurations are not affected (PREEMPT_NONE,
PREEMPT_VOLOUNTARY).

Signed-off-by: Mathieu Desnoyers <email address hidden>
Change-Id: I67211e9f8ae96dce0e05a377827d606d1e54b0f8

2098. By Mathieu Desnoyers

ring buffer: clarify requirement for disabled page fault handler

The implementation is OK, but let's improve clarity about the need to
call those functions with the page fault handler disabled.

Signed-off-by: Mathieu Desnoyers <email address hidden>
Change-Id: If30514085777d9b2225fd1513d77356510a6af6d

2097. By Michael Jeanson <email address hidden>

Add missing prototype for wrapper_get_pfnblock_flags_mask()

Fix the following error when building with '-Werror -Wmissing-prototypes':

wrapper/page_alloc.c:30:15: error: no previous prototype for ‘wrapper_get_pfnblock_flags_mask’ [-Werror=missing-prototypes]
   30 | unsigned long wrapper_get_pfnblock_flags_mask(const struct page *page,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Change-Id: I071ffc36fb5ec7b6b19adab9589c567e1b42c217
Signed-off-by: Michael Jeanson <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

2096. By Michael Jeanson <email address hidden>

fix: mm: remove the for_reclaim field from struct writeback_control (v6.17)

See upstream commit:

  commit a8fb49c6abbbe5c71e1a8a888ef2c4b3e341d169
  Author: Christoph Hellwig <email address hidden>
  Date: Tue Jun 10 07:49:42 2025 +0200

    mm: remove the for_reclaim field from struct writeback_control

    This field is now only set to one in the i915 gem code that only calls
    writeback_iter on it, which ignores the flag. All other checks are thuse
    dead code and the field can be removed.

    Link: https://<email address hidden>

Change-Id: I0ebe86ac2e2b280d3e3b53515db47bf86883e6d0
Signed-off-by: Michael Jeanson <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

2095. By Michael Jeanson <email address hidden>

fix: btrfs: use refcount_t type for the extent buffer reference counter (v6.17)

See upstream commit:

  commit b769777d927af168b1389388392bfd7dc4e38399
  Author: Filipe Manana <email address hidden>
  Date: Mon Jun 2 13:56:48 2025 +0100

    btrfs: use refcount_t type for the extent buffer reference counter

    Instead of using a bare atomic, use the refcount_t type, which despite
    being a structure that contains only an atomic, has an API that checks
    for underflows and other hazards. This doesn't change the size of the
    extent_buffer structure.

    This removes the need to do things like this:

        WARN_ON(atomic_read(&eb->refs) == 0);
        if (atomic_dec_and_test(&eb->refs)) {
            (...)
        }

    And do just:

        if (refcount_dec_and_test(&eb->refs)) {
            (...)
        }

    Since refcount_dec_and_test() already triggers a warning when we decrement
    a ref count that has a value of 0 (or below zero).

Change-Id: Ia937a200029b5b5c3fcc69f7a3867a0b7d563667
Signed-off-by: Michael Jeanson <email address hidden>
Signed-off-by: Mathieu Desnoyers <email address hidden>

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
This branch contains Public information 
Everyone can see this information.

Subscribers