rfi-flush: Switch to new linear fallback flush

Bug #1744173 reported by bugproxy on 2018-01-18
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
The Ubuntu-power-systems project
High
Canonical Kernel Team
linux (Ubuntu)
High
Canonical Kernel Team
Xenial
High
Joseph Salisbury
Artful
High
Joseph Salisbury

Bug Description

[Impact]
Change flush method from "congruence-first with dependencies" to "linear with no dependencies", which increases flush performance by 8x on P8, and
3x on P9. Measured with null syscall loop, which will have the flush area in the L2 cache.

The flush also becomes simpler and more adaptable to different cache
geometries.

[Test Case]
TBD.

[Regression Potential]
The risk is deemed low since the changes are confined to POWER only and the provided test kernels have been tested by IBM.

bugproxy (bugproxy) on 2018-01-18
tags: added: architecture-ppc64le bugnameltc-163715 severity-medium targetmilestone-inin1710
Changed in ubuntu:
assignee: nobody → Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage)

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1744173/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment

------- Comment (attachment only) From <email address hidden> 2018-01-19 07:39 EDT-------

Changed in ubuntu-power-systems:
importance: Undecided → Medium
assignee: nobody → Canonical Kernel Team (canonical-kernel-team)
tags: added: triage-g
affects: ubuntu → linux (Ubuntu)

------- Comment From <email address hidden> 2018-01-19 09:33 EDT-------
Canonical, please target this one for Xenial GA (4.4) also, please.
This also affects Xenial and I am attaching the backport of the fix for Xenial

------- Comment (attachment only) From <email address hidden> 2018-01-19 09:34 EDT-------

Changed in ubuntu-power-systems:
status: New → Triaged
Manoj Iyer (manjo) on 2018-01-22
Changed in linux (Ubuntu):
assignee: Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage) → Canonical Kernel Team (canonical-kernel-team)
Changed in linux (Ubuntu Xenial):
assignee: nobody → Canonical Kernel Team (canonical-kernel-team)
Changed in linux (Ubuntu):
importance: Undecided → Medium
Changed in linux (Ubuntu Xenial):
importance: Undecided → Medium
tags: added: kernel-da-key
Changed in linux (Ubuntu):
status: New → Triaged
Changed in linux (Ubuntu Xenial):
status: New → Triaged
Manoj Iyer (manjo) on 2018-02-12
tags: added: triage-a
removed: triage-g
Andrew Cloke (andrew-cloke) wrote :

Hi Breno, this bug is currently marked with a "medium" priority. Should that prioritisation be reviewed? Thanks, Andy.

Breno Leitão (breno-leitao) wrote :

Yes, Andy. This is part of the Meltdown patchset. It is very important to have it integrated, as, it increase the flush performance in 8x on a POWER8.

Changed in ubuntu-power-systems:
importance: Medium → High
Manoj Iyer (manjo) on 2018-03-05
Changed in linux (Ubuntu Xenial):
importance: Medium → High
Changed in linux (Ubuntu):
importance: Medium → High
Changed in linux (Ubuntu Artful):
status: New → Triaged
importance: Undecided → High
assignee: nobody → Canonical Kernel Team (canonical-kernel-team)

------- Comment (attachment only) From <email address hidden> 2018-01-19 07:39 EDT-------

I built Xenial and Artful test kernels with the patch sets provided in comments #2 and #4. The test kernels can be downloaded from:

http://kernel.ubuntu.com/~jsalisbury/lp1744173

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!

Manoj Iyer (manjo) on 2018-04-05
Changed in linux (Ubuntu Artful):
status: Triaged → Incomplete
Breno Leitão (breno-leitao) wrote :

hi Joseph,

I tested on both versions and the kernel solves the problem:

== Xenial ==
# uname -a
Linux 1604 4.4.0-116-generic #140~lp1744174 SMP Tue Mar 6 14:15:54 UTC 2018 ppc64le ppc64le ppc64le GNU/Linux

== Artful ==
# uname -a
Linux 1710 4.13.0-36-generic #40~lp1744173 SMP Tue Mar 6 14:17:17 UTC 2018 ppc64le ppc64le ppc64le GNU/Linux

The patches can make the official tree in my opinion.

PS: You look the kernel version, it has the extesion ~lpXXXXXX, one refers to lp1744173 and the other one to lp1744174, but I understand it was a typo, and both refers to the same fix (lp1744173), right?

Thanks!

Joseph Salisbury (jsalisbury) wrote :

You are correct. The xenial kernel name had a type in it. Sorry about that.

Changed in linux (Ubuntu Artful):
status: Incomplete → Triaged
status: Triaged → In Progress
Changed in linux (Ubuntu Xenial):
status: Triaged → In Progress
Changed in linux (Ubuntu):
status: Triaged → In Progress
Changed in linux (Ubuntu Xenial):
assignee: Canonical Kernel Team (canonical-kernel-team) → Joseph Salisbury (jsalisbury)
Changed in linux (Ubuntu Artful):
assignee: Canonical Kernel Team (canonical-kernel-team) → Joseph Salisbury (jsalisbury)
Changed in ubuntu-power-systems:
status: Triaged → In Progress
Breno Leitão (breno-leitao) wrote :

Hello Joseph,

Any update on this bug?

Juerg Haefliger (juergh) wrote :

Hi Breno,

Sorry for the late reply. Regarding Xenial, we updated the kernel to a later upstream stable version since you posted the patches. 4.4.0-123.147 from -proposed should be in sync with 4.4.128 now and your patches don't apply cleanly any longer. When updating to 4.4.117 we reverted a bunch of SAUCE rfi-flush patches and replaced them with the upstream versions. Is there a possibility that your patches are no longer required with those updates?

Thanks
...Juerg

Juerg Haefliger (juergh) on 2018-05-08
summary: - artful: rfi-flush: Switch to new linear fallback flush
+ rfi-flush: Switch to new linear fallback flush
Juerg Haefliger (juergh) on 2018-05-08
description: updated
Breno Leitão (breno-leitao) wrote :

Hi Juerg,

> When updating to 4.4.117 we reverted a bunch of SAUCE rfi-flush patches and replaced them with the
> upstream versions. Is there a possibility that your patches are no longer required with those updates?

None of these patches seems to be integrated int 4.4.0-124. So, we will need to backport them again. I will be working to get this done.

What about artful (kernel 4.13). Are the patches still applying?

------- Comment on attachment From <email address hidden> 2018-05-24 21:22 EDT-------

I have updated the patchset for Artful with master-next today and a single test of stress-ng.

Juerg Haefliger (juergh) on 2018-05-25
description: updated

------- Comment on attachment From <email address hidden> 2018-05-25 16:20 EDT-------

The previous update on xenial branch for stf barrier brought some base patches for rfi flush, set up to a minimal patchset at beginning with 16 and now 4 patches.

tags: added: triage-g
removed: triage-a
Juerg Haefliger (juergh) wrote :

For the latest xenial patchset: What's the purpose of patches 0001 & 0004??

------- Comment From <email address hidden> 2018-05-29 10:41 EDT-------
@juergh

I believe all of them in the xenial_wav2_patchet.tar.gz.

@brenohl

Any concern?

bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2018-05-29 10:52 EDT-------
hi there,

I understand those two patches helped on the clean cherry pick of the other two. We might not need it if we decide to backport the other patches other than cleanly cherry pick .

Juerg Haefliger (juergh) wrote :

Thanks for the clarification, @brenohl. I decided to drop the two and adjust the patch that collided. See https://lists.ubuntu.com/archives/kernel-team/2018-May/092834.html.

Juerg Haefliger (juergh) on 2018-06-07
Changed in linux (Ubuntu Xenial):
status: In Progress → Fix Committed
Changed in linux (Ubuntu Artful):
status: In Progress → Fix Committed
Manoj Iyer (manjo) on 2018-06-11
Changed in ubuntu-power-systems:
status: In Progress → Fix Committed
Brad Figg (brad-figg) 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
Brad Figg (brad-figg) 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-xenial' to 'verification-done-xenial'. If the problem still exists, change the tag 'verification-needed-xenial' to 'verification-failed-xenial'.

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-xenial
Changed in linux (Ubuntu):
status: In Progress → Fix Committed

Hello IBM,

Could you please verify the fix(es) with the Xenial and Artful kernels currently in -proposed?

Thank you.

Launchpad Janitor (janitor) wrote :

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

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

  * linux: 4.13.0-46.51 -proposed tracker (LP: #1776333)

  * register on binfmt_misc may overflow and crash the system (LP: #1775856)
    - fs/binfmt_misc.c: do not allow offset overflow

  * CVE-2018-11508
    - compat: fix 4-byte infoleak via uninitialized struct field

  * rfi-flush: Switch to new linear fallback flush (LP: #1744173)
    - SAUCE: rfi-flush: Factor out init_fallback_flush()
    - SAUCE: rfi-flush: Move rfi_flush_fallback_area to end of paca
    - powerpc/64s: Improve RFI L1-D cache flush fallback
    - powerpc/rfi-flush: Make it possible to call setup_rfi_flush() again
    - powerpc/rfi-flush: Differentiate enabled and patched flush types
    - powerpc/rfi-flush: Call setup_rfi_flush() after LPM migration

  * Fix enabling bridge MMIO windows (LP: #1771344)
    - powerpc/eeh: Fix enabling bridge MMIO windows

  * CVE-2018-1130
    - dccp: check sk for closed state in dccp_sendmsg()

  * CVE-2018-7757
    - scsi: libsas: fix memory leak in sas_smp_get_phy_events()

  * cpum_sf: ensure sample freq is non-zero (LP: #1772593)
    - s390/cpum_sf: ensure sample frequency of perf event attributes is non-zero

  * wlp3s0: failed to remove key (1, ff:ff:ff:ff:ff:ff) from hardware (-22)
    (LP: #1720930)
    - iwlwifi: mvm: fix "failed to remove key" message

  * CVE-2018-6927
    - futex: Prevent overflow by strengthen input validation

  * After update to 4.13-43 Intel Graphics are Laggy (LP: #1773520)
    - SAUCE: Revert "drm/i915/edp: Allow alternate fixed mode for eDP if
      available."

  * ELANPAD ELAN0612 does not work, patch available (LP: #1773509)
    - SAUCE: Input: elan_i2c - add ELAN0612 to the ACPI table

  * kernel backtrace when receiving large UDP packages (LP: #1772031)
    - iov_iter: fix page_copy_sane for compound pages

  * FS-Cache: Assertion failed: FS-Cache: 6 == 5 is false (LP: #1774336)
    - SAUCE: CacheFiles: fix a read_waiter/read_copier race

  * CVE-2018-5803
    - sctp: verify size of a new chunk in _sctp_make_chunk()

  * enable mic-mute hotkey and led on Lenovo M820z and M920z (LP: #1774306)
    - ALSA: hda/realtek - Enable mic-mute hotkey for several Lenovo AIOs

  * CVE-2018-7755
    - SAUCE: floppy: Do not copy a kernel pointer to user memory in FDGETPRM ioctl

  * CVE-2018-5750
    - ACPI: sbshc: remove raw pointer from printk() message

 -- Khalid Elmously <email address hidden> Mon, 11 Jun 2018 23:25:30 +0000

Changed in linux (Ubuntu Artful):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :
Download full text (29.8 KiB)

This bug was fixed in the package linux - 4.4.0-130.156

---------------
linux (4.4.0-130.156) xenial; urgency=medium

  * linux: 4.4.0-130.156 -proposed tracker (LP: #1776822)

  * CVE-2018-3665 (x86)
    - x86/fpu: Fix early FPU command-line parsing
    - x86/fpu: Fix 'no387' regression
    - x86/fpu: Disable MPX when eagerfpu is off
    - x86/fpu: Default eagerfpu=on on all CPUs
    - x86/fpu: Fix FNSAVE usage in eagerfpu mode
    - x86/fpu: Fix math emulation in eager fpu mode
    - x86/fpu: Fix eager-FPU handling on legacy FPU machines

linux (4.4.0-129.155) xenial; urgency=medium

  * linux: 4.4.0-129.155 -proposed tracker (LP: #1776352)

  * Xenial update to 4.4.134 stable release (LP: #1775771)
    - MIPS: ptrace: Expose FIR register through FP regset
    - MIPS: Fix ptrace(2) PTRACE_PEEKUSR and PTRACE_POKEUSR accesses to o32 FGRs
    - KVM: Fix spelling mistake: "cop_unsuable" -> "cop_unusable"
    - affs_lookup(): close a race with affs_remove_link()
    - aio: fix io_destroy(2) vs. lookup_ioctx() race
    - ALSA: timer: Fix pause event notification
    - mmc: sdhci-iproc: fix 32bit writes for TRANSFER_MODE register
    - libata: Blacklist some Sandisk SSDs for NCQ
    - libata: blacklist Micron 500IT SSD with MU01 firmware
    - xen-swiotlb: fix the check condition for xen_swiotlb_free_coherent
    - Revert "ipc/shm: Fix shmat mmap nil-page protection"
    - ipc/shm: fix shmat() nil address after round-down when remapping
    - kasan: fix memory hotplug during boot
    - kernel/sys.c: fix potential Spectre v1 issue
    - kernel/signal.c: avoid undefined behaviour in kill_something_info
    - xfs: remove racy hasattr check from attr ops
    - do d_instantiate/unlock_new_inode combinations safely
    - firewire-ohci: work around oversized DMA reads on JMicron controllers
    - NFSv4: always set NFS_LOCK_LOST when a lock is lost.
    - ALSA: hda - Use IS_REACHABLE() for dependency on input
    - ASoC: au1x: Fix timeout tests in au1xac97c_ac97_read()
    - kvm: x86: fix KVM_XEN_HVM_CONFIG ioctl
    - tracing/hrtimer: Fix tracing bugs by taking all clock bases and modes into
      account
    - PCI: Add function 1 DMA alias quirk for Marvell 9128
    - tools lib traceevent: Simplify pointer print logic and fix %pF
    - perf callchain: Fix attr.sample_max_stack setting
    - tools lib traceevent: Fix get_field_str() for dynamic strings
    - dm thin: fix documentation relative to low water mark threshold
    - nfs: Do not convert nfs_idmap_cache_timeout to jiffies
    - watchdog: sp5100_tco: Fix watchdog disable bit
    - kconfig: Don't leak main menus during parsing
    - kconfig: Fix automatic menu creation mem leak
    - kconfig: Fix expr_free() E_NOT leak
    - ipmi/powernv: Fix error return code in ipmi_powernv_probe()
    - Btrfs: set plug for fsync
    - btrfs: Fix out of bounds access in btrfs_search_slot
    - Btrfs: fix scrub to repair raid6 corruption
    - scsi: fas216: fix sense buffer initialization
    - HID: roccat: prevent an out of bounds read in kovaplus_profile_activated()
    - jffs2: Fix use-after-free bug in jffs2_iget()'s error handling path
    - powerpc/numa: Use ibm,max-associativity-domains to discover possib...

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

Other bug subscribers