Skip to content

Free some memory on resume before re-loading modules #568

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 6, 2025

Conversation

marmarek
Copy link
Member

Intel wifi driver wants to allocate large contiguous memory blocks
(for example with Intel BE200 it's 128k). Try to force some memory
(possibly pushing some apps into swap) and then force memory compaction

  • just before loading wifi drivers back (depending on device, module
    either gets loaded, or just bound to the device).

Do this by using dd to allocate 512MB of memory. The amount is large
enough to force swapping, but it's still significantly below the swap
size (1GB) so it doesn't trigger OOM.

Fixes QubesOS/qubes-issues#9869

Intel wifi driver wants to allocate large contiguous memory blocks
(for example with Intel BE200 it's 128k). Try to force some memory
(possibly pushing some apps into swap) and then force memory compaction
- just before loading wifi drivers back (depending on device, module
either gets loaded, or just bound to the device).

Do this by using dd to allocate 512MB of memory. The amount is large
enough to force swapping, but it's still significantly below the swap
size (1GB) so it doesn't trigger OOM.

Fixes QubesOS/qubes-issues#9869
Copy link

codecov bot commented Mar 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.68%. Comparing base (f909c50) to head (56f5b0b).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #568      +/-   ##
==========================================
- Coverage   71.10%   70.68%   -0.42%     
==========================================
  Files           3        3              
  Lines         481      481              
==========================================
- Hits          342      340       -2     
- Misses        139      141       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@qubesos-bot
Copy link

qubesos-bot commented Mar 31, 2025

OpenQA test summary

Complete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2025040403-4.3&flavor=pull-requests

Test run included the following:

New failures, excluding unstable

Compared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2025031804-4.3&flavor=update

  • system_tests_whonix

    • whonixcheck: unnamed test (unknown)

    • whonixcheck: wait_serial (wait serial expected)
      # wait_serial expected: qr/TBvsr-\d+-/...

    • whonixcheck: Failed (test died + timed out)
      # Test died: command 'qvm-run -ap whonix-gateway-17 'LC_ALL=C whon...

  • system_tests_splitgpg

  • system_tests_guivm_gui_interactive

    • simple_gui_apps: unnamed test (unknown)

    • simple_gui_apps: Failed (test died)
      # Test died: no candidate needle with tag(s) 'desktop' matched...

    • simple_gui_apps: unnamed test (unknown)

  • system_tests_qrexec

  • system_tests_kde_gui_interactive

    • gui_keyboard_layout: wait_serial (wait serial expected)
      # wait_serial expected: "echo -e '[Layout]\nLayoutList=us,de' | sud...

    • gui_keyboard_layout: Failed (test died)
      # Test died: command 'test "$(cd ~user;ls e1*)" = "$(qvm-run -p wor...

  • system_tests_audio

  • system_tests_qwt_win10@hw13

    • windows_install: wait_serial (wait serial expected)
      # wait_serial expected: qr/LDWI1-\d+-/...

    • windows_install: Failed (test died + timed out)
      # Test died: command 'script -e -c 'bash -x /usr/bin/qvm-create-win...

  • system_tests_qwt_win10_seamless@hw13

    • windows_clipboard_and_filecopy: unnamed test (unknown)
    • windows_clipboard_and_filecopy: Failed (test died)
      # Test died: no candidate needle with tag(s) 'windows-Explorer-empt...
  • system_tests_qwt_win11@hw13

    • windows_clipboard_and_filecopy: unnamed test (unknown)
    • windows_clipboard_and_filecopy: Failed (test died)
      # Test died: no candidate needle with tag(s) 'windows-Notepad' matc...
  • system_tests_basic_vm_qrexec_gui_ext4

    • TC_20_NonAudio_whonix-gateway-17-pool: test_010_run_xterm (error)
      raise TimeoutError from exc_val... TimeoutError
  • system_tests_gui_tools@hw7

    • qui_widgets_notifications: wait_serial (wait serial expected)
      # wait_serial expected: qr/IZhbA-\d+-/...

    • qui_widgets_notifications: Failed (test died + timed out)
      # Test died: command 'qvm-run work true' timed out at /usr/lib/os-a...

  • system_tests_extra

Failed tests

45 failures
  • system_tests_whonix

    • whonixcheck: fail (unknown)
      Whonixcheck for anon-whonix failed...

    • whonixcheck: unnamed test (unknown)

    • whonixcheck: wait_serial (wait serial expected)
      # wait_serial expected: qr/TBvsr-\d+-/...

    • whonixcheck: Failed (test died + timed out)
      # Test died: command 'qvm-run -ap whonix-gateway-17 'LC_ALL=C whon...

  • system_tests_splitgpg

  • system_tests_guivm_gui_interactive

    • simple_gui_apps: unnamed test (unknown)

    • simple_gui_apps: Failed (test died)
      # Test died: no candidate needle with tag(s) 'desktop' matched...

    • simple_gui_apps: unnamed test (unknown)

  • system_tests_qrexec

  • system_tests_kde_gui_interactive

    • gui_keyboard_layout: wait_serial (wait serial expected)
      # wait_serial expected: "echo -e '[Layout]\nLayoutList=us,de' | sud...

    • gui_keyboard_layout: Failed (test died)
      # Test died: command 'test "$(cd ~user;ls e1*)" = "$(qvm-run -p wor...

  • system_tests_audio

  • system_tests_qwt_win10@hw13

    • windows_install: wait_serial (wait serial expected)
      # wait_serial expected: qr/LDWI1-\d+-/...

    • windows_install: Failed (test died + timed out)
      # Test died: command 'script -e -c 'bash -x /usr/bin/qvm-create-win...

  • system_tests_qwt_win10_seamless@hw13

    • windows_clipboard_and_filecopy: unnamed test (unknown)
    • windows_clipboard_and_filecopy: Failed (test died)
      # Test died: no candidate needle with tag(s) 'windows-Explorer-empt...
  • system_tests_qwt_win11@hw13

    • windows_clipboard_and_filecopy: unnamed test (unknown)
    • windows_clipboard_and_filecopy: Failed (test died)
      # Test died: no candidate needle with tag(s) 'windows-Notepad' matc...
  • system_tests_basic_vm_qrexec_gui_ext4

    • TC_20_NonAudio_whonix-gateway-17-pool: test_010_run_xterm (error)
      raise TimeoutError from exc_val... TimeoutError
  • system_tests_gui_tools@hw7

    • qui_widgets_notifications: wait_serial (wait serial expected)
      # wait_serial expected: qr/IZhbA-\d+-/...

    • qui_widgets_notifications: Failed (test died + timed out)
      # Test died: command 'qvm-run work true' timed out at /usr/lib/os-a...

  • system_tests_extra

Fixed failures

Compared to: https://openqa.qubes-os.org/tests/132953#dependencies

12 fixed
  • system_tests_whonix

  • system_tests_basic_vm_qrexec_gui

  • system_tests_qrexec

  • system_tests_kde_gui_interactive

    • clipboard_and_web: unnamed test (unknown)

    • clipboard_and_web: Failed (test died)
      # Test died: no candidate needle with tag(s) 'qubes-website' matche...

    • clipboard_and_web: wait_serial (wait serial expected)
      # wait_serial expected: "lspci; echo 2E8vz-\$?-"...

  • system_tests_guivm_vnc_gui_interactive

    • gui_filecopy: unnamed test (unknown)
    • gui_filecopy: Failed (test died)
      # Test died: no candidate needle with tag(s) 'files-work' matched...
  • system_tests_whonix@hw7

    • whonixcheck: fail (unknown)
      Whonixcheck for sys-whonix failed...

    • whonixcheck: unnamed test (unknown)

  • system_tests_suspend

    • suspend: unnamed test (unknown)
    • suspend: Failed (test died)
      # Test died: no candidate needle with tag(s) 'SUSPEND-FAILED' match...

Unstable tests

Performance Tests

Performance degradation:

11 performance degradations
  • debian-12-xfce_exec: 8.44 :small_red_triangle_up: ( previous job: 7.12, degradation: 118.55%)
  • whonix-workstation-17_socket-root: 8.97 :small_red_triangle_up: ( previous job: 8.13, degradation: 110.28%)
  • dom0_root_rnd4k_q1t1_read 3:read_bandwidth_kb: 7790.00 :small_red_triangle_up: ( previous job: 10795.00, degradation: 72.16%)
  • dom0_varlibqubes_seq1m_q1t1_write 3:write_bandwidth_kb: 163856.00 :small_red_triangle_up: ( previous job: 184752.00, degradation: 88.69%)
  • dom0_varlibqubes_rnd4k_q32t1_read 3:read_bandwidth_kb: 44576.00 :small_red_triangle_up: ( previous job: 62195.00, degradation: 71.67%)
  • fedora-41-xfce_root_seq1m_q1t1_write 3:write_bandwidth_kb: 41229.00 :small_red_triangle_up: ( previous job: 87940.00, degradation: 46.88%)
  • fedora-41-xfce_private_seq1m_q8t1_read 3:read_bandwidth_kb: 310689.00 :small_red_triangle_up: ( previous job: 373957.00, degradation: 83.08%)
  • fedora-41-xfce_volatile_seq1m_q8t1_write 3:write_bandwidth_kb: 157414.00 :small_red_triangle_up: ( previous job: 179949.00, degradation: 87.48%)
  • fedora-41-xfce_volatile_seq1m_q1t1_read 3:read_bandwidth_kb: 246956.00 :small_red_triangle_up: ( previous job: 324737.00, degradation: 76.05%)
  • fedora-41-xfce_volatile_rnd4k_q32t1_write 3:write_bandwidth_kb: 2954.00 :small_red_triangle_up: ( previous job: 5672.00, degradation: 52.08%)
  • fedora-41-xfce_volatile_rnd4k_q1t1_write 3:write_bandwidth_kb: 781.00 :small_red_triangle_up: ( previous job: 1953.00, degradation: 39.99%)

Remaining performance tests:

61 tests
  • debian-12-xfce_exec-root: 29.43 :small_red_triangle_up: ( previous job: 28.65, degradation: 102.70%)
  • debian-12-xfce_socket: 8.98 :small_red_triangle_up: ( previous job: 8.60, degradation: 104.35%)
  • debian-12-xfce_socket-root: 8.82 :small_red_triangle_up: ( previous job: 8.52, degradation: 103.45%)
  • debian-12-xfce_exec-data-simplex: 71.73 :small_red_triangle_up: ( previous job: 71.62, degradation: 100.15%)
  • debian-12-xfce_exec-data-duplex: 62.94 🟢 ( previous job: 70.34, improvement: 89.48%)
  • debian-12-xfce_exec-data-duplex-root: 90.35 :small_red_triangle_up: ( previous job: 82.72, degradation: 109.23%)
  • debian-12-xfce_socket-data-duplex: 167.85 :small_red_triangle_up: ( previous job: 156.96, degradation: 106.94%)
  • fedora-41-xfce_exec: 9.25 🟢 ( previous job: 9.27, improvement: 99.85%)
  • fedora-41-xfce_exec-root: 61.53 :small_red_triangle_up: ( previous job: 61.51, degradation: 100.04%)
  • fedora-41-xfce_socket: 8.35 🟢 ( previous job: 8.63, improvement: 96.72%)
  • fedora-41-xfce_socket-root: 8.78 :small_red_triangle_up: ( previous job: 8.71, degradation: 100.86%)
  • fedora-41-xfce_exec-data-simplex: 66.77 🟢 ( previous job: 75.53, improvement: 88.40%)
  • fedora-41-xfce_exec-data-duplex: 73.91 :small_red_triangle_up: ( previous job: 71.56, degradation: 103.29%)
  • fedora-41-xfce_exec-data-duplex-root: 97.29 🟢 ( previous job: 109.13, improvement: 89.15%)
  • fedora-41-xfce_socket-data-duplex: 150.99 :small_red_triangle_up: ( previous job: 150.61, degradation: 100.25%)
  • whonix-gateway-17_exec: 6.41 🟢 ( previous job: 6.82, improvement: 94.03%)
  • whonix-gateway-17_exec-root: 42.52 :small_red_triangle_up: ( previous job: 40.43, degradation: 105.17%)
  • whonix-gateway-17_socket: 7.91 :small_red_triangle_up: ( previous job: 7.24, degradation: 109.30%)
  • whonix-gateway-17_socket-root: 8.19 :small_red_triangle_up: ( previous job: 7.65, degradation: 107.08%)
  • whonix-gateway-17_exec-data-simplex: 74.71 🟢 ( previous job: 78.32, improvement: 95.39%)
  • whonix-gateway-17_exec-data-duplex: 72.66 🟢 ( previous job: 76.65, improvement: 94.79%)
  • whonix-gateway-17_exec-data-duplex-root: 79.32 🟢 ( previous job: 88.52, improvement: 89.60%)
  • whonix-gateway-17_socket-data-duplex: 174.78 :small_red_triangle_up: ( previous job: 171.76, degradation: 101.76%)
  • whonix-workstation-17_exec: 7.40 🟢 ( previous job: 7.67, improvement: 96.46%)
  • whonix-workstation-17_exec-root: 56.38 🟢 ( previous job: 58.26, improvement: 96.76%)
  • whonix-workstation-17_socket: 8.30 :small_red_triangle_up: ( previous job: 8.19, degradation: 101.24%)
  • whonix-workstation-17_exec-data-simplex: 74.11 🟢 ( previous job: 74.99, improvement: 98.82%)
  • whonix-workstation-17_exec-data-duplex: 72.46 🟢 ( previous job: 72.71, improvement: 99.66%)
  • whonix-workstation-17_exec-data-duplex-root: 88.02 🟢 ( previous job: 99.82, improvement: 88.18%)
  • whonix-workstation-17_socket-data-duplex: 164.79 🟢 ( previous job: 169.50, improvement: 97.22%)
  • dom0_root_seq1m_q8t1_read 3:read_bandwidth_kb: 471694.00 :green_circle: ( previous job: 446963.00, improvement: 105.53%)
  • dom0_root_seq1m_q8t1_write 3:write_bandwidth_kb: 160046.00 :green_circle: ( previous job: 129298.00, improvement: 123.78%)
  • dom0_root_seq1m_q1t1_read 3:read_bandwidth_kb: 267221.00 :small_red_triangle_up: ( previous job: 294295.00, degradation: 90.80%)
  • dom0_root_seq1m_q1t1_write 3:write_bandwidth_kb: 157176.00 :green_circle: ( previous job: 95454.00, improvement: 164.66%)
  • dom0_root_rnd4k_q32t1_read 3:read_bandwidth_kb: 104664.00 :green_circle: ( previous job: 79803.00, improvement: 131.15%)
  • dom0_root_rnd4k_q32t1_write 3:write_bandwidth_kb: 6216.00 :green_circle: ( previous job: 6149.00, improvement: 101.09%)
  • dom0_root_rnd4k_q1t1_write 3:write_bandwidth_kb: 5160.00 :green_circle: ( previous job: 4826.00, improvement: 106.92%)
  • dom0_varlibqubes_seq1m_q8t1_read 3:read_bandwidth_kb: 513253.00 :green_circle: ( previous job: 382273.00, improvement: 134.26%)
  • dom0_varlibqubes_seq1m_q8t1_write 3:write_bandwidth_kb: 257825.00 :green_circle: ( previous job: 250795.00, improvement: 102.80%)
  • dom0_varlibqubes_seq1m_q1t1_read 3:read_bandwidth_kb: 440948.00 :green_circle: ( previous job: 437636.00, improvement: 100.76%)
  • dom0_varlibqubes_rnd4k_q32t1_write 3:write_bandwidth_kb: 8136.00 :green_circle: ( previous job: 6479.00, improvement: 125.57%)
  • dom0_varlibqubes_rnd4k_q1t1_read 3:read_bandwidth_kb: 7614.00 :small_red_triangle_up: ( previous job: 7669.00, degradation: 99.28%)
  • dom0_varlibqubes_rnd4k_q1t1_write 3:write_bandwidth_kb: 4706.00 :small_red_triangle_up: ( previous job: 4903.00, degradation: 95.98%)
  • fedora-41-xfce_root_seq1m_q8t1_read 3:read_bandwidth_kb: 372231.00 :green_circle: ( previous job: 368309.00, improvement: 101.06%)
  • fedora-41-xfce_root_seq1m_q8t1_write 3:write_bandwidth_kb: 262735.00 :green_circle: ( previous job: 162081.00, improvement: 162.10%)
  • fedora-41-xfce_root_seq1m_q1t1_read 3:read_bandwidth_kb: 303847.00 :small_red_triangle_up: ( previous job: 318716.00, degradation: 95.33%)
  • fedora-41-xfce_root_rnd4k_q32t1_read 3:read_bandwidth_kb: 88679.00 :green_circle: ( previous job: 82694.00, improvement: 107.24%)
  • fedora-41-xfce_root_rnd4k_q32t1_write 3:write_bandwidth_kb: 3671.00 :green_circle: ( previous job: 3599.00, improvement: 102.00%)
  • fedora-41-xfce_root_rnd4k_q1t1_read 3:read_bandwidth_kb: 8439.00 :small_red_triangle_up: ( previous job: 8485.00, degradation: 99.46%)
  • fedora-41-xfce_root_rnd4k_q1t1_write 3:write_bandwidth_kb: 1104.00 :green_circle: ( previous job: 542.00, improvement: 203.69%)
  • fedora-41-xfce_private_seq1m_q8t1_write 3:write_bandwidth_kb: 199116.00 :green_circle: ( previous job: 170062.00, improvement: 117.08%)
  • fedora-41-xfce_private_seq1m_q1t1_read 3:read_bandwidth_kb: 348479.00 :green_circle: ( previous job: 334687.00, improvement: 104.12%)
  • fedora-41-xfce_private_seq1m_q1t1_write 3:write_bandwidth_kb: 61395.00 :small_red_triangle_up: ( previous job: 61534.00, degradation: 99.77%)
  • fedora-41-xfce_private_rnd4k_q32t1_read 3:read_bandwidth_kb: 84358.00 :green_circle: ( previous job: 80283.00, improvement: 105.08%)
  • fedora-41-xfce_private_rnd4k_q32t1_write 3:write_bandwidth_kb: 3991.00 :green_circle: ( previous job: 2215.00, improvement: 180.18%)
  • fedora-41-xfce_private_rnd4k_q1t1_read 3:read_bandwidth_kb: 8128.00 :green_circle: ( previous job: 7540.00, improvement: 107.80%)
  • fedora-41-xfce_private_rnd4k_q1t1_write 3:write_bandwidth_kb: 2156.00 :green_circle: ( previous job: 1130.00, improvement: 190.80%)
  • fedora-41-xfce_volatile_seq1m_q8t1_read 3:read_bandwidth_kb: 357875.00 :small_red_triangle_up: ( previous job: 369868.00, degradation: 96.76%)
  • fedora-41-xfce_volatile_seq1m_q1t1_write 3:write_bandwidth_kb: 67285.00 :green_circle: ( previous job: 17567.00, improvement: 383.02%)
  • fedora-41-xfce_volatile_rnd4k_q32t1_read 3:read_bandwidth_kb: 82479.00 :green_circle: ( previous job: 79021.00, improvement: 104.38%)
  • fedora-41-xfce_volatile_rnd4k_q1t1_read 3:read_bandwidth_kb: 8078.00 :green_circle: ( previous job: 7867.00, improvement: 102.68%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Intel BE200 Wifi Adapter not available after resuming from suspend state
2 participants