Cherry pick c96f5471ce7d for delayacct fix

Bug #1747769 reported by Josh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Joseph Salisbury
Artful
Fix Released
Medium
Joseph Salisbury
Bionic
Fix Released
Medium
Joseph Salisbury

Bug Description

== SRU Justification ==
Mainline commit e33a9bba85a8 introduced a regression in v4.11-rc1. This regression
caused delayacct_blkio_end() to be called by try_to_wake_up().
However, the call was made before we have context-switched. This patch is now correct, in that
the delay accounting ends when the I/O is complete.

Commit c96f5471ce7 is in mainline as fo v4.15-rc9.

== Fix ==
commit c96f5471ce7d2aefd0dda560cc23f08ab00bc65d
Author: Josh Snyder <email address hidden>
Date: Mon Dec 18 16:15:10 2017 +0000

    delayacct: Account blkio completion on the correct task

== Regression Potential ==
Low. This commit has also been cc'd to stable, so it has had additional upstream
review.

== Test Case ==
A test kernel was built with this patch and tested by the original bug reporter.
The bug reporter states the test kernel resolved the bug.

Please cherry pick upstream commit c96f5471ce7d ("delayacct: Account blkio completion on the correct task") into the Ubuntu 4.13 kernel. It has also been accepted into the Linux stable branch as 4.14.15.

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1747769

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Josh (hashbrowncipher) wrote :

I think logfiles are irrelevant to this cherry-pick request.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
tags: added: artful kernel-da-key
Changed in linux (Ubuntu Artful):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Joseph Salisbury (jsalisbury)
Changed in linux (Ubuntu):
assignee: nobody → Joseph Salisbury (jsalisbury)
status: Triaged → In Progress
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I built a test kernel with commit c96f5471ce7d. The test kernel can be downloaded from:
http://kernel.ubuntu.com/~jsalisbury/lp1747769

Can you test this kernel and see if it resolves this bug?

Note, to test this kernel, you need to install both the linux-image and linux-image-extra .deb packages.

Thanks in advance!

Revision history for this message
Josh (hashbrowncipher) wrote :

Yes, this build fixes the bug.

# uname -a; dd if=/dev/xvda iflag=direct bs=16384 of=/dev/null & DD_PID=$!; sleep 1 && ./getdelays -di -p $DD_PID; kill $DD_PID; wait
Linux hostname-redacted 4.13.0-32-generic #35~lp1747769 SMP Thu Feb 8 17:37:46 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[1] 9578
print delayacct stats ON
printing IO accounting
PID 9578

CPU count real total virtual total delay total delay average
                 2621 0 23341678 709838 0.000ms
IO count delay total delay average
                 2620 975185892 0ms
SWAP count delay total delay average
                    0 0 0ms
RECLAIM count delay total delay average
                    0 0 0ms
dd: read=42942464, write=0, cancelled_write=0
[1]+ Terminated dd if=/dev/xvda iflag=direct bs=16384 of=/dev/null

Revision history for this message
Josh (hashbrowncipher) wrote :

# uname -a; dd if=/dev/xvda iflag=direct bs=16384 of=/dev/null & DD_PID=$!; sleep 1 && ./getdelays -di -p $DD_PID; kill $DD_PID; wait
Linux hostname-redacted 4.13.0-32-generic #35~lp1747769 SMP Thu Feb 8 17:37:46 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[1] 9578
print delayacct stats ON
printing IO accounting
PID 9578

CPU count real total virtual total delay total delay average
                 2621 0 23341678 709838 0.000ms
IO count delay total delay average
                 2620 975185892 0ms
SWAP count delay total delay average
                    0 0 0ms
RECLAIM count delay total delay average
                    0 0 0ms
dd: read=42942464, write=0, cancelled_write=0
[1]+ Terminated dd if=/dev/xvda iflag=direct bs=16384 of=/dev/null

Revision history for this message
Josh (hashbrowncipher) wrote :

The attached file 'Command output' contains the same terminal output as is pasted in the comment, but whitespace hasn't been munged.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :
description: updated
Changed in linux (Ubuntu Bionic):
status: In Progress → Fix Committed
Changed in linux (Ubuntu Artful):
status: In Progress → Fix Committed
Revision history for this message
Stefan Bader (smb) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-artful' to 'verification-done-artful'. If the problem still exists, change the tag 'verification-needed-artful' to 'verification-failed-artful'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-artful
Josh (hashbrowncipher)
tags: added: verification-done-artful
removed: verification-needed-artful
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (18.9 KiB)

This bug was fixed in the package linux - 4.13.0-38.43

---------------
linux (4.13.0-38.43) artful; urgency=medium

  * linux: 4.13.0-38.43 -proposed tracker (LP: #1755762)

  * Servers going OOM after updating kernel from 4.10 to 4.13 (LP: #1748408)
    - i40e: Fix memory leak related filter programming status
    - i40e: Add programming descriptors to cleaned_count

  * [SRU] Lenovo E41 Mic mute hotkey is not responding (LP: #1753347)
    - platform/x86: ideapad-laptop: Increase timeout to wait for EC answer

  * fails to dump with latest kpti fixes (LP: #1750021)
    - kdump: write correct address of mem_section into vmcoreinfo

  * headset mic can't be detected on two Dell machines (LP: #1748807)
    - ALSA: hda/realtek - Support headset mode for ALC215/ALC285/ALC289
    - ALSA: hda - Fix headset mic detection problem for two Dell machines
    - ALSA: hda - Fix a wrong FIXUP for alc289 on Dell machines

  * CIFS SMB2/SMB3 does not work for domain based DFS (LP: #1747572)
    - CIFS: make IPC a regular tcon
    - CIFS: use tcon_ipc instead of use_ipc parameter of SMB2_ioctl
    - CIFS: dump IPC tcon in debug proc file

  * i2c-thunderx: erroneous error message "unhandled state: 0" (LP: #1754076)
    - i2c: octeon: Prevent error message on bus error

  * hisi_sas: Add disk LED support (LP: #1752695)
    - scsi: hisi_sas: directly attached disk LED feature for v2 hw

  * EDAC, sb_edac: Backport 1 patch to Ubuntu 17.10 (Fix missing DIMM sysfs
    entries with KNL SNC2/SNC4 mode) (LP: #1743856)
    - EDAC, sb_edac: Fix missing DIMM sysfs entries with KNL SNC2/SNC4 mode

  * [regression] Colour banding and artefacts appear system-wide on an Asus
    Zenbook UX303LA with Intel HD 4400 graphics (LP: #1749420)
    - drm/edid: Add 6 bpc quirk for CPT panel in Asus UX303LA

  * DVB Card with SAA7146 chipset not working (LP: #1742316)
    - vmalloc: fix __GFP_HIGHMEM usage for vmalloc_32 on 32b systems

  * [Asus UX360UA] battery status in unity-panel is not changing when battery is
    being charged (LP: #1661876) // AC adapter status not detected on Asus
    ZenBook UX410UAK (LP: #1745032)
    - ACPI / battery: Add quirk for Asus UX360UA and UX410UAK

  * ASUS UX305LA - Battery state not detected correctly (LP: #1482390)
    - ACPI / battery: Add quirk for Asus GL502VSK and UX305LA

  * support thunderx2 vendor pmu events (LP: #1747523)
    - perf pmu: Extract function to get JSON alias map
    - perf pmu: Pass pmu as a parameter to get_cpuid_str()
    - perf tools arm64: Add support for get_cpuid_str function.
    - perf pmu: Add helper function is_pmu_core to detect PMU CORE devices
    - perf vendor events arm64: Add ThunderX2 implementation defined pmu core
      events
    - perf pmu: Add check for valid cpuid in perf_pmu__find_map()

  * lpfc.ko module doesn't work (LP: #1746970)
    - scsi: lpfc: Fix loop mode target discovery

  * Ubuntu 17.10 crashes on vmalloc.c (LP: #1739498)
    - powerpc/mm/book3s64: Make KERN_IO_START a variable
    - powerpc/mm/slb: Move comment next to the code it's referring to
    - powerpc/mm/hash64: Make vmalloc 56T on hash

  * ethtool -p fails to light NIC LED on HiSilicon D05 systems (LP: #1748567)
    - net...

Changed in linux (Ubuntu Artful):
status: Fix Committed → Fix Released
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

c96f5471ce7d and its following fix has been applied to Bionic.

Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
Changed in linux (Ubuntu Bionic):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.