Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-34106

LTP: madvise11 needs to handle -EBUSY when requesting soft offilining

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • CentOS Stream 9
    • Test Suite
    • None
    • None
    • None
    • 1
    • rhel-sst-kernel-ft
    • ssg_core_kernel
    • 3
    • False
    • Hide

      None

      Show
      None
    • None
    • CK-May-2024
    • None
    • None
    • None

      While analyzing

              LTP: madvise11 sometimes fails with madvise(..., MADV_SOFT_OFFLINE) returning -EBUSY

              https://issues.redhat.com/browse/RHEL-9292

      I noticed that the test fails whenever the madvise() request to soft offline (MADV_SOFT_OFFLINE) pages receives an eventual -EBUSY. This is not a kernel problem as -EBUSY is a valid value. The problem is that the test stops with a failure report.

      The details for the cases where -EBUSY can be returned are described in RHEL-9292.

      The error handling in madvise11.c is:

      https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/syscalls/madvise/madvise11.c#L130C1-L136C5

                  if (madvise(ptrs[num_alloc], pagesize, MADV_SOFT_OFFLINE) == -1) {
                      if (errno != EINVAL)
                          tst_res(TFAIL | TERRNO, "madvise failed");
                      if (errno == EINVAL)
                          tst_res(TCONF, "madvise() didn't support MADV_SOFT_OFFLINE");
                      return errno;
                  } 

      As a side note, there is an associated issue that the man-pages for madvise(2) do not mention -EBUSY as a possible return for madvise soft offlining requests. https://issues.redhat.com/browse/RHEL-34105

              rhn-support-liwan Li Wang
              rhn-engineering-lgoncalv Luis Goncalves
              Li Wang Li Wang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: