[Kernel-packages] [Bug 1806488] Re: Support non-strict iommu mode on arm64

2023-09-09 Thread Ubuntu Kernel Bot
This bug is awaiting verification that the linux-
aws-5.15/5.15.0-1046.51~20.04.1 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-focal-linux-
aws-5.15' to 'verification-done-focal-linux-aws-5.15'. If the problem
still exists, change the tag 'verification-needed-focal-linux-aws-5.15'
to 'verification-failed-focal-linux-aws-5.15'.

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: kernel-spammed-focal-linux-aws-5.15-v2 
verification-needed-focal-linux-aws-5.15

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux-aws in Ubuntu.
https://bugs.launchpad.net/bugs/1806488

Title:
  Support non-strict iommu mode on arm64

Status in linux package in Ubuntu:
  Fix Released
Status in linux-aws package in Ubuntu:
  Fix Released
Status in linux source package in Bionic:
  Fix Released
Status in linux-aws source package in Bionic:
  Invalid
Status in linux source package in Cosmic:
  Fix Released
Status in linux-aws source package in Cosmic:
  Invalid
Status in linux source package in Disco:
  Fix Released
Status in linux-aws source package in Disco:
  Invalid
Status in linux source package in Jammy:
  Invalid
Status in linux-aws source package in Jammy:
  Fix Released
Status in linux source package in Kinetic:
  Invalid
Status in linux-aws source package in Kinetic:
  Fix Released
Status in linux source package in Lunar:
  Fix Released
Status in linux-aws source package in Lunar:
  Fix Released

Bug description:
  [Impact]
  The Intel IOMMU driver provides an option for strict mode. When disabled, 
batching of IOTLB flush operations is permitted, allowing the user to trade-off 
isolation for improved performance. Ubuntu's kernel currently lacks a parity 
for this feature for ARM.

  There's a significant performance gain to be had by removing the need
  to flush the IOMMU TLB on every unmap on arm64. I'm seeing a 25%
  performance gain w/ fio reads on a single NVMe device.

  This mode of operation is available for x86 via the
  "intel_iommu=strict" parameter. Upstream now exposes an equivalent
  feature for ARM platforms via the "iommu.strict=[0|1]" parameter,
  while retaining the default strict-enabled mode.

  [Test Case]
  Run fio with the following config before and after applying the patches and 
collection IOPS count. Run again after applying the patches. Finally, run a 3rd 
time after adding iommu.strict=0 to the kernel commandline.

  Performance should not regress after the update. Performance should
  further improve after adding iommu.strict=0 - but if it doesn't for
  some reason, that is not a regression.

  $ cat fio.rc
  [global]
  rw=read
  direct=1
  ioengine=libaio
  iodepth=2048
  numjobs=10
  bs=4k
  group_reporting=1
  group_reporting=1
  cpumask=0xff
  runtime=100
  loops = 1

  [job1]
  filename=/dev/nvme0n1

  [Fix]
  44f6876a00e83 iommu/arm-smmu: Support non-strict mode
  b2dfeba654cb0 iommu/io-pgtable-arm-v7s: Add support for non-strict mode
  9662b99a19abc iommu/arm-smmu-v3: Add support for non-strict mode
  b6b65ca20bc93 iommu/io-pgtable-arm: Add support for non-strict mode
  68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  2da274cdf998a iommu/dma: Add support for non-strict mode
  07fdef34d2be6 iommu/arm-smmu-v3: Implement flush_iotlb_all hook
  85c7a0f1ef624 iommu/io-pgtable-arm: Fix race handling in split_blk_unmap()

  [Regression Risk]
  Most of these patches are specific to ARM, and have been regression tested on 
both arm64 (HiSilicon D06) and armhf (QEMU virt) using "stress-ng --vm $(nproc)"

  2 patches do touch arch-indep code however:

  > 68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  Adds a new command line option and sets an attribute that iommu drivers can 
optionally react to. Doesn't change default behavior.

  > 2da274cdf998a iommu/dma: Add support for non-strict mode
  This driver is only built for arm64 and ppc64el (determined by looking at the 
build logs). Most of this patch only changes behavior in the non-default (and 
new) iommu.strict=0 case. The exception, which is called out in the commit 
message, is this hunk:

  -   WARN_ON(iommu_unmap(domain, dma_addr, size) != size);
  +   WARN_ON(iommu_unmap_fast(domain, dma_addr, size) != size);
  +   if (!cookie->fq_domain)
  +   iommu_tlb_sync(domain);

  In the default case, where fq_domain will be NULl, we are now factoring 
iommu_unmap() into:
    iommu_unmap_fast()
    iommu_tlb_sync()

  Looking at the source to iommu_unmap() confirms that this is
  functionally equivalent.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1806

[Kernel-packages] [Bug 1806488] Re: Support non-strict iommu mode on arm64

2023-03-26 Thread Launchpad Bug Tracker
This bug was fixed in the package linux-aws - 6.2.0-1002.2

---
linux-aws (6.2.0-1002.2) lunar; urgency=medium

  * lunar/linux-aws: 6.2.0-1002.2 -proposed tracker (LP: #2011518)

 -- Paolo Pisati   Tue, 14 Mar 2023 11:04:29
+0100

** Changed in: linux-aws (Ubuntu Lunar)
   Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux-aws in Ubuntu.
https://bugs.launchpad.net/bugs/1806488

Title:
  Support non-strict iommu mode on arm64

Status in linux package in Ubuntu:
  Fix Released
Status in linux-aws package in Ubuntu:
  Fix Released
Status in linux source package in Bionic:
  Fix Released
Status in linux-aws source package in Bionic:
  Invalid
Status in linux source package in Cosmic:
  Fix Released
Status in linux-aws source package in Cosmic:
  Invalid
Status in linux source package in Disco:
  Fix Released
Status in linux-aws source package in Disco:
  Invalid
Status in linux source package in Jammy:
  Invalid
Status in linux-aws source package in Jammy:
  Fix Released
Status in linux source package in Kinetic:
  Invalid
Status in linux-aws source package in Kinetic:
  Fix Released
Status in linux source package in Lunar:
  Fix Released
Status in linux-aws source package in Lunar:
  Fix Released

Bug description:
  [Impact]
  The Intel IOMMU driver provides an option for strict mode. When disabled, 
batching of IOTLB flush operations is permitted, allowing the user to trade-off 
isolation for improved performance. Ubuntu's kernel currently lacks a parity 
for this feature for ARM.

  There's a significant performance gain to be had by removing the need
  to flush the IOMMU TLB on every unmap on arm64. I'm seeing a 25%
  performance gain w/ fio reads on a single NVMe device.

  This mode of operation is available for x86 via the
  "intel_iommu=strict" parameter. Upstream now exposes an equivalent
  feature for ARM platforms via the "iommu.strict=[0|1]" parameter,
  while retaining the default strict-enabled mode.

  [Test Case]
  Run fio with the following config before and after applying the patches and 
collection IOPS count. Run again after applying the patches. Finally, run a 3rd 
time after adding iommu.strict=0 to the kernel commandline.

  Performance should not regress after the update. Performance should
  further improve after adding iommu.strict=0 - but if it doesn't for
  some reason, that is not a regression.

  $ cat fio.rc
  [global]
  rw=read
  direct=1
  ioengine=libaio
  iodepth=2048
  numjobs=10
  bs=4k
  group_reporting=1
  group_reporting=1
  cpumask=0xff
  runtime=100
  loops = 1

  [job1]
  filename=/dev/nvme0n1

  [Fix]
  44f6876a00e83 iommu/arm-smmu: Support non-strict mode
  b2dfeba654cb0 iommu/io-pgtable-arm-v7s: Add support for non-strict mode
  9662b99a19abc iommu/arm-smmu-v3: Add support for non-strict mode
  b6b65ca20bc93 iommu/io-pgtable-arm: Add support for non-strict mode
  68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  2da274cdf998a iommu/dma: Add support for non-strict mode
  07fdef34d2be6 iommu/arm-smmu-v3: Implement flush_iotlb_all hook
  85c7a0f1ef624 iommu/io-pgtable-arm: Fix race handling in split_blk_unmap()

  [Regression Risk]
  Most of these patches are specific to ARM, and have been regression tested on 
both arm64 (HiSilicon D06) and armhf (QEMU virt) using "stress-ng --vm $(nproc)"

  2 patches do touch arch-indep code however:

  > 68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  Adds a new command line option and sets an attribute that iommu drivers can 
optionally react to. Doesn't change default behavior.

  > 2da274cdf998a iommu/dma: Add support for non-strict mode
  This driver is only built for arm64 and ppc64el (determined by looking at the 
build logs). Most of this patch only changes behavior in the non-default (and 
new) iommu.strict=0 case. The exception, which is called out in the commit 
message, is this hunk:

  -   WARN_ON(iommu_unmap(domain, dma_addr, size) != size);
  +   WARN_ON(iommu_unmap_fast(domain, dma_addr, size) != size);
  +   if (!cookie->fq_domain)
  +   iommu_tlb_sync(domain);

  In the default case, where fq_domain will be NULl, we are now factoring 
iommu_unmap() into:
    iommu_unmap_fast()
    iommu_tlb_sync()

  Looking at the source to iommu_unmap() confirms that this is
  functionally equivalent.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1806488/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp


[Kernel-packages] [Bug 1806488] Re: Support non-strict iommu mode on arm64

2023-02-13 Thread Launchpad Bug Tracker
This bug was fixed in the package linux-aws - 5.15.0-1030.34

---
linux-aws (5.15.0-1030.34) jammy; urgency=medium

  * jammy/linux-aws: 5.15.0-1030.34 -proposed tracker (LP: #2003424)

  [ Ubuntu: 5.15.0-60.66 ]

  * jammy/linux: 5.15.0-60.66 -proposed tracker (LP: #2003450)
  * Revoke & rotate to new signing key (LP: #2002812)
- [Packaging] Revoke and rotate to new signing key

linux-aws (5.15.0-1029.33) jammy; urgency=medium

  * jammy/linux-aws: 5.15.0-1029.33 -proposed tracker (LP: #2001759)

  * Jammy update: v5.15.75 upstream stable release (LP: #1996825) // Jammy
update: v5.15.76 upstream stable release (LP: #1997113)
- [Config] aws: Update configs after rebase

  * Support non-strict iommu mode on arm64 (LP: #1806488)
- [Config] aws: CONFIG_IOMMU_DEFAULT_DMA_LAZY=y for arm64

  [ Ubuntu: 5.15.0-59.65 ]

  * jammy/linux: 5.15.0-59.65 -proposed tracker (LP: #2001801)
  * Packaging resync (LP: #1786013)
- [Packaging] update helper scripts
  * CVE-2022-47940
- ksmbd: validate length in smb2_write()
  * Fix iosm: WWAN cannot build the connection (DW5823e) (LP: #1998115)
- net: wwan: iosm: fix driver not working with INTEL_IOMMU disabled
- [Config] CONFIG_IOSM update annotations on arm64 armhf ppc64el s390x
  * support for same series backports versioning numbers (LP: #1993563)
- [Packaging] sameport -- add support for sameport versioning
  * [DEP-8] Run ADT regression suite for lowlatency kernels Jammy and later
(LP: #1999528)
- [DEP-8] Fix regression suite to run on lowlatency
  * Micron NVME storage failure [1344,5407] (LP: #1998883)
- nvme: add a bogus subsystem NQN quirk for Micron MTFDKBA2T0TFH
  * Jammy update: v5.15.78 upstream stable release (LP: #1998843)
- scsi: lpfc: Rework MIB Rx Monitor debug info logic
- serial: ar933x: Deassert Transmit Enable on ->rs485_config()
- KVM: x86: Trace re-injected exceptions
- KVM: x86: Treat #DBs from the emulator as fault-like (code and DR7.GD=1)
- drm/amd/display: explicitly disable psr_feature_enable appropriately
- mm/hugetlb: fix races when looking up a CONT-PTE/PMD size hugetlb page
- HID: playstation: add initial DualSense Edge controller support
- KVM: x86: Protect the unused bits in MSR exiting flags
- KVM: x86: Copy filter arg outside kvm_vm_ioctl_set_msr_filter()
- KVM: x86: Add compat handler for KVM_X86_SET_MSR_FILTER
- RDMA/cma: Use output interface for net_dev check
- IB/hfi1: Correctly move list in sc_disable()
- RDMA/hns: Remove magic number
- RDMA/hns: Use hr_reg_xxx() instead of remaining roce_set_xxx()
- RDMA/hns: Disable local invalidate operation
- NFSv4: Fix a potential state reclaim deadlock
- NFSv4.1: Handle RECLAIM_COMPLETE trunking errors
- NFSv4.1: We must always send RECLAIM_COMPLETE after a reboot
- SUNRPC: Fix null-ptr-deref when xps sysfs alloc failed
- NFSv4.2: Fixup CLONE dest file size for zero-length count
- nfs4: Fix kmemleak when allocate slot failed
- net: dsa: Fix possible memory leaks in dsa_loop_init()
- RDMA/core: Fix null-ptr-deref in ib_core_cleanup()
- RDMA/qedr: clean up work queue on failure in qedr_alloc_resources()
- net: dsa: fall back to default tagger if we can't load the one from DT
- nfc: fdp: Fix potential memory leak in fdp_nci_send()
- nfc: nxp-nci: Fix potential memory leak in nxp_nci_send()
- nfc: s3fwrn5: Fix potential memory leak in s3fwrn5_nci_send()
- nfc: nfcmrvl: Fix potential memory leak in nfcmrvl_i2c_nci_send()
- net: fec: fix improper use of NETDEV_TX_BUSY
- ata: pata_legacy: fix pdc20230_set_piomode()
- net: sched: Fix use after free in red_enqueue()
- net: tun: fix bugs for oversize packet when napi frags enabled
- netfilter: nf_tables: netlink notifier might race to release objects
- netfilter: nf_tables: release flow rule object from commit path
- ipvs: use explicitly signed chars
- ipvs: fix WARNING in __ip_vs_cleanup_batch()
- ipvs: fix WARNING in ip_vs_app_net_cleanup()
- rose: Fix NULL pointer dereference in rose_send_frame()
- mISDN: fix possible memory leak in mISDN_register_device()
- isdn: mISDN: netjet: fix wrong check of device registration
- btrfs: fix inode list leak during backref walking at 
resolve_indirect_refs()
- btrfs: fix inode list leak during backref walking at find_parent_nodes()
- btrfs: fix ulist leaks in error paths of qgroup self tests
- netfilter: ipset: enforce documented limit to prevent allocating huge 
memory
- Bluetooth: virtio_bt: Use skb_put to set length
- Bluetooth: L2CAP: fix use-after-free in l2cap_conn_del()
- Bluetooth: L2CAP: Fix memory leak in vhci_write
- net: mdio: fix undefined behavior in bit shift for __mdiobus_register
- ibmvnic: Free rwi on reset success
- stmmac: dwmac-loongson: fix invalid mdio_node
- net/smc: Fix possible leaked pernet namespace in smc_init()
- net, 

[Kernel-packages] [Bug 1806488] Re: Support non-strict iommu mode on arm64

2023-01-31 Thread Ubuntu Kernel Bot
This bug is awaiting verification that the linux-
aws-5.19/5.19.0-1019.20~22.04.1 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-jammy' to
'verification-done-jammy'. If the problem still exists, change the tag
'verification-needed-jammy' to 'verification-failed-jammy'.

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: kernel-spammed-jammy-linux-aws-5.19

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux-aws in Ubuntu.
https://bugs.launchpad.net/bugs/1806488

Title:
  Support non-strict iommu mode on arm64

Status in linux package in Ubuntu:
  Fix Released
Status in linux-aws package in Ubuntu:
  Fix Committed
Status in linux source package in Bionic:
  Fix Released
Status in linux-aws source package in Bionic:
  Invalid
Status in linux source package in Cosmic:
  Fix Released
Status in linux-aws source package in Cosmic:
  Invalid
Status in linux source package in Disco:
  Fix Released
Status in linux-aws source package in Disco:
  Invalid
Status in linux source package in Jammy:
  Invalid
Status in linux-aws source package in Jammy:
  Fix Committed
Status in linux source package in Kinetic:
  Invalid
Status in linux-aws source package in Kinetic:
  Fix Released
Status in linux source package in Lunar:
  Fix Released
Status in linux-aws source package in Lunar:
  Fix Committed

Bug description:
  [Impact]
  The Intel IOMMU driver provides an option for strict mode. When disabled, 
batching of IOTLB flush operations is permitted, allowing the user to trade-off 
isolation for improved performance. Ubuntu's kernel currently lacks a parity 
for this feature for ARM.

  There's a significant performance gain to be had by removing the need
  to flush the IOMMU TLB on every unmap on arm64. I'm seeing a 25%
  performance gain w/ fio reads on a single NVMe device.

  This mode of operation is available for x86 via the
  "intel_iommu=strict" parameter. Upstream now exposes an equivalent
  feature for ARM platforms via the "iommu.strict=[0|1]" parameter,
  while retaining the default strict-enabled mode.

  [Test Case]
  Run fio with the following config before and after applying the patches and 
collection IOPS count. Run again after applying the patches. Finally, run a 3rd 
time after adding iommu.strict=0 to the kernel commandline.

  Performance should not regress after the update. Performance should
  further improve after adding iommu.strict=0 - but if it doesn't for
  some reason, that is not a regression.

  $ cat fio.rc
  [global]
  rw=read
  direct=1
  ioengine=libaio
  iodepth=2048
  numjobs=10
  bs=4k
  group_reporting=1
  group_reporting=1
  cpumask=0xff
  runtime=100
  loops = 1

  [job1]
  filename=/dev/nvme0n1

  [Fix]
  44f6876a00e83 iommu/arm-smmu: Support non-strict mode
  b2dfeba654cb0 iommu/io-pgtable-arm-v7s: Add support for non-strict mode
  9662b99a19abc iommu/arm-smmu-v3: Add support for non-strict mode
  b6b65ca20bc93 iommu/io-pgtable-arm: Add support for non-strict mode
  68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  2da274cdf998a iommu/dma: Add support for non-strict mode
  07fdef34d2be6 iommu/arm-smmu-v3: Implement flush_iotlb_all hook
  85c7a0f1ef624 iommu/io-pgtable-arm: Fix race handling in split_blk_unmap()

  [Regression Risk]
  Most of these patches are specific to ARM, and have been regression tested on 
both arm64 (HiSilicon D06) and armhf (QEMU virt) using "stress-ng --vm $(nproc)"

  2 patches do touch arch-indep code however:

  > 68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  Adds a new command line option and sets an attribute that iommu drivers can 
optionally react to. Doesn't change default behavior.

  > 2da274cdf998a iommu/dma: Add support for non-strict mode
  This driver is only built for arm64 and ppc64el (determined by looking at the 
build logs). Most of this patch only changes behavior in the non-default (and 
new) iommu.strict=0 case. The exception, which is called out in the commit 
message, is this hunk:

  -   WARN_ON(iommu_unmap(domain, dma_addr, size) != size);
  +   WARN_ON(iommu_unmap_fast(domain, dma_addr, size) != size);
  +   if (!cookie->fq_domain)
  +   iommu_tlb_sync(domain);

  In the default case, where fq_domain will be NULl, we are now factoring 
iommu_unmap() into:
    iommu_unmap_fast()
    iommu_tlb_sync()

  Looking at the source to iommu_unmap() confirms that this is
  functionally equivalent.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1806488/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-pack

[Kernel-packages] [Bug 1806488] Re: Support non-strict iommu mode on arm64

2023-01-18 Thread Ubuntu Kernel Bot
This bug is awaiting verification that the linux-aws/5.15.0-1029.33
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-jammy' to 'verification-done-jammy'. If the
problem still exists, change the tag 'verification-needed-jammy' to
'verification-failed-jammy'.

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: kernel-spammed-jammy-linux-aws verification-needed-jammy

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux-aws in Ubuntu.
https://bugs.launchpad.net/bugs/1806488

Title:
  Support non-strict iommu mode on arm64

Status in linux package in Ubuntu:
  Fix Released
Status in linux-aws package in Ubuntu:
  Fix Committed
Status in linux source package in Bionic:
  Fix Released
Status in linux-aws source package in Bionic:
  Invalid
Status in linux source package in Cosmic:
  Fix Released
Status in linux-aws source package in Cosmic:
  Invalid
Status in linux source package in Disco:
  Fix Released
Status in linux-aws source package in Disco:
  Invalid
Status in linux source package in Jammy:
  Invalid
Status in linux-aws source package in Jammy:
  Fix Committed
Status in linux source package in Kinetic:
  Invalid
Status in linux-aws source package in Kinetic:
  Fix Released
Status in linux source package in Lunar:
  Fix Released
Status in linux-aws source package in Lunar:
  Fix Committed

Bug description:
  [Impact]
  The Intel IOMMU driver provides an option for strict mode. When disabled, 
batching of IOTLB flush operations is permitted, allowing the user to trade-off 
isolation for improved performance. Ubuntu's kernel currently lacks a parity 
for this feature for ARM.

  There's a significant performance gain to be had by removing the need
  to flush the IOMMU TLB on every unmap on arm64. I'm seeing a 25%
  performance gain w/ fio reads on a single NVMe device.

  This mode of operation is available for x86 via the
  "intel_iommu=strict" parameter. Upstream now exposes an equivalent
  feature for ARM platforms via the "iommu.strict=[0|1]" parameter,
  while retaining the default strict-enabled mode.

  [Test Case]
  Run fio with the following config before and after applying the patches and 
collection IOPS count. Run again after applying the patches. Finally, run a 3rd 
time after adding iommu.strict=0 to the kernel commandline.

  Performance should not regress after the update. Performance should
  further improve after adding iommu.strict=0 - but if it doesn't for
  some reason, that is not a regression.

  $ cat fio.rc
  [global]
  rw=read
  direct=1
  ioengine=libaio
  iodepth=2048
  numjobs=10
  bs=4k
  group_reporting=1
  group_reporting=1
  cpumask=0xff
  runtime=100
  loops = 1

  [job1]
  filename=/dev/nvme0n1

  [Fix]
  44f6876a00e83 iommu/arm-smmu: Support non-strict mode
  b2dfeba654cb0 iommu/io-pgtable-arm-v7s: Add support for non-strict mode
  9662b99a19abc iommu/arm-smmu-v3: Add support for non-strict mode
  b6b65ca20bc93 iommu/io-pgtable-arm: Add support for non-strict mode
  68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  2da274cdf998a iommu/dma: Add support for non-strict mode
  07fdef34d2be6 iommu/arm-smmu-v3: Implement flush_iotlb_all hook
  85c7a0f1ef624 iommu/io-pgtable-arm: Fix race handling in split_blk_unmap()

  [Regression Risk]
  Most of these patches are specific to ARM, and have been regression tested on 
both arm64 (HiSilicon D06) and armhf (QEMU virt) using "stress-ng --vm $(nproc)"

  2 patches do touch arch-indep code however:

  > 68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  Adds a new command line option and sets an attribute that iommu drivers can 
optionally react to. Doesn't change default behavior.

  > 2da274cdf998a iommu/dma: Add support for non-strict mode
  This driver is only built for arm64 and ppc64el (determined by looking at the 
build logs). Most of this patch only changes behavior in the non-default (and 
new) iommu.strict=0 case. The exception, which is called out in the commit 
message, is this hunk:

  -   WARN_ON(iommu_unmap(domain, dma_addr, size) != size);
  +   WARN_ON(iommu_unmap_fast(domain, dma_addr, size) != size);
  +   if (!cookie->fq_domain)
  +   iommu_tlb_sync(domain);

  In the default case, where fq_domain will be NULl, we are now factoring 
iommu_unmap() into:
    iommu_unmap_fast()
    iommu_tlb_sync()

  Looking at the source to iommu_unmap() confirms that this is
  functionally equivalent.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1806488/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kern

[Kernel-packages] [Bug 1806488] Re: Support non-strict iommu mode on arm64

2023-01-12 Thread Ubuntu Kernel Bot
This bug is awaiting verification that the linux-aws/5.19.0-1018.19
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-kinetic' to 'verification-done-kinetic'. If the
problem still exists, change the tag 'verification-needed-kinetic' to
'verification-failed-kinetic'.

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: kernel-spammed-kinetic-linux-aws verification-needed-kinetic

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux-aws in Ubuntu.
https://bugs.launchpad.net/bugs/1806488

Title:
  Support non-strict iommu mode on arm64

Status in linux package in Ubuntu:
  Fix Released
Status in linux-aws package in Ubuntu:
  Fix Committed
Status in linux source package in Bionic:
  Fix Released
Status in linux-aws source package in Bionic:
  Invalid
Status in linux source package in Cosmic:
  Fix Released
Status in linux-aws source package in Cosmic:
  Invalid
Status in linux source package in Disco:
  Fix Released
Status in linux-aws source package in Disco:
  Invalid
Status in linux source package in Jammy:
  Invalid
Status in linux-aws source package in Jammy:
  Fix Committed
Status in linux source package in Kinetic:
  Invalid
Status in linux-aws source package in Kinetic:
  Fix Released
Status in linux source package in Lunar:
  Fix Released
Status in linux-aws source package in Lunar:
  Fix Committed

Bug description:
  [Impact]
  The Intel IOMMU driver provides an option for strict mode. When disabled, 
batching of IOTLB flush operations is permitted, allowing the user to trade-off 
isolation for improved performance. Ubuntu's kernel currently lacks a parity 
for this feature for ARM.

  There's a significant performance gain to be had by removing the need
  to flush the IOMMU TLB on every unmap on arm64. I'm seeing a 25%
  performance gain w/ fio reads on a single NVMe device.

  This mode of operation is available for x86 via the
  "intel_iommu=strict" parameter. Upstream now exposes an equivalent
  feature for ARM platforms via the "iommu.strict=[0|1]" parameter,
  while retaining the default strict-enabled mode.

  [Test Case]
  Run fio with the following config before and after applying the patches and 
collection IOPS count. Run again after applying the patches. Finally, run a 3rd 
time after adding iommu.strict=0 to the kernel commandline.

  Performance should not regress after the update. Performance should
  further improve after adding iommu.strict=0 - but if it doesn't for
  some reason, that is not a regression.

  $ cat fio.rc
  [global]
  rw=read
  direct=1
  ioengine=libaio
  iodepth=2048
  numjobs=10
  bs=4k
  group_reporting=1
  group_reporting=1
  cpumask=0xff
  runtime=100
  loops = 1

  [job1]
  filename=/dev/nvme0n1

  [Fix]
  44f6876a00e83 iommu/arm-smmu: Support non-strict mode
  b2dfeba654cb0 iommu/io-pgtable-arm-v7s: Add support for non-strict mode
  9662b99a19abc iommu/arm-smmu-v3: Add support for non-strict mode
  b6b65ca20bc93 iommu/io-pgtable-arm: Add support for non-strict mode
  68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  2da274cdf998a iommu/dma: Add support for non-strict mode
  07fdef34d2be6 iommu/arm-smmu-v3: Implement flush_iotlb_all hook
  85c7a0f1ef624 iommu/io-pgtable-arm: Fix race handling in split_blk_unmap()

  [Regression Risk]
  Most of these patches are specific to ARM, and have been regression tested on 
both arm64 (HiSilicon D06) and armhf (QEMU virt) using "stress-ng --vm $(nproc)"

  2 patches do touch arch-indep code however:

  > 68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  Adds a new command line option and sets an attribute that iommu drivers can 
optionally react to. Doesn't change default behavior.

  > 2da274cdf998a iommu/dma: Add support for non-strict mode
  This driver is only built for arm64 and ppc64el (determined by looking at the 
build logs). Most of this patch only changes behavior in the non-default (and 
new) iommu.strict=0 case. The exception, which is called out in the commit 
message, is this hunk:

  -   WARN_ON(iommu_unmap(domain, dma_addr, size) != size);
  +   WARN_ON(iommu_unmap_fast(domain, dma_addr, size) != size);
  +   if (!cookie->fq_domain)
  +   iommu_tlb_sync(domain);

  In the default case, where fq_domain will be NULl, we are now factoring 
iommu_unmap() into:
    iommu_unmap_fast()
    iommu_tlb_sync()

  Looking at the source to iommu_unmap() confirms that this is
  functionally equivalent.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1806488/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post t

[Kernel-packages] [Bug 1806488] Re: Support non-strict iommu mode on arm64

2022-12-15 Thread Tim Gardner
** Changed in: linux-aws (Ubuntu Jammy)
   Status: In Progress => Fix Committed

** Changed in: linux-aws (Ubuntu Kinetic)
   Status: In Progress => Fix Committed

** Changed in: linux-aws (Ubuntu Lunar)
   Status: In Progress => Fix Committed

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux-aws in Ubuntu.
https://bugs.launchpad.net/bugs/1806488

Title:
  Support non-strict iommu mode on arm64

Status in linux package in Ubuntu:
  Fix Released
Status in linux-aws package in Ubuntu:
  Fix Committed
Status in linux source package in Bionic:
  Fix Released
Status in linux-aws source package in Bionic:
  Invalid
Status in linux source package in Cosmic:
  Fix Released
Status in linux-aws source package in Cosmic:
  Invalid
Status in linux source package in Disco:
  Fix Released
Status in linux-aws source package in Disco:
  Invalid
Status in linux source package in Jammy:
  Invalid
Status in linux-aws source package in Jammy:
  Fix Committed
Status in linux source package in Kinetic:
  Invalid
Status in linux-aws source package in Kinetic:
  Fix Committed
Status in linux source package in Lunar:
  Fix Released
Status in linux-aws source package in Lunar:
  Fix Committed

Bug description:
  [Impact]
  The Intel IOMMU driver provides an option for strict mode. When disabled, 
batching of IOTLB flush operations is permitted, allowing the user to trade-off 
isolation for improved performance. Ubuntu's kernel currently lacks a parity 
for this feature for ARM.

  There's a significant performance gain to be had by removing the need
  to flush the IOMMU TLB on every unmap on arm64. I'm seeing a 25%
  performance gain w/ fio reads on a single NVMe device.

  This mode of operation is available for x86 via the
  "intel_iommu=strict" parameter. Upstream now exposes an equivalent
  feature for ARM platforms via the "iommu.strict=[0|1]" parameter,
  while retaining the default strict-enabled mode.

  [Test Case]
  Run fio with the following config before and after applying the patches and 
collection IOPS count. Run again after applying the patches. Finally, run a 3rd 
time after adding iommu.strict=0 to the kernel commandline.

  Performance should not regress after the update. Performance should
  further improve after adding iommu.strict=0 - but if it doesn't for
  some reason, that is not a regression.

  $ cat fio.rc
  [global]
  rw=read
  direct=1
  ioengine=libaio
  iodepth=2048
  numjobs=10
  bs=4k
  group_reporting=1
  group_reporting=1
  cpumask=0xff
  runtime=100
  loops = 1

  [job1]
  filename=/dev/nvme0n1

  [Fix]
  44f6876a00e83 iommu/arm-smmu: Support non-strict mode
  b2dfeba654cb0 iommu/io-pgtable-arm-v7s: Add support for non-strict mode
  9662b99a19abc iommu/arm-smmu-v3: Add support for non-strict mode
  b6b65ca20bc93 iommu/io-pgtable-arm: Add support for non-strict mode
  68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  2da274cdf998a iommu/dma: Add support for non-strict mode
  07fdef34d2be6 iommu/arm-smmu-v3: Implement flush_iotlb_all hook
  85c7a0f1ef624 iommu/io-pgtable-arm: Fix race handling in split_blk_unmap()

  [Regression Risk]
  Most of these patches are specific to ARM, and have been regression tested on 
both arm64 (HiSilicon D06) and armhf (QEMU virt) using "stress-ng --vm $(nproc)"

  2 patches do touch arch-indep code however:

  > 68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  Adds a new command line option and sets an attribute that iommu drivers can 
optionally react to. Doesn't change default behavior.

  > 2da274cdf998a iommu/dma: Add support for non-strict mode
  This driver is only built for arm64 and ppc64el (determined by looking at the 
build logs). Most of this patch only changes behavior in the non-default (and 
new) iommu.strict=0 case. The exception, which is called out in the commit 
message, is this hunk:

  -   WARN_ON(iommu_unmap(domain, dma_addr, size) != size);
  +   WARN_ON(iommu_unmap_fast(domain, dma_addr, size) != size);
  +   if (!cookie->fq_domain)
  +   iommu_tlb_sync(domain);

  In the default case, where fq_domain will be NULl, we are now factoring 
iommu_unmap() into:
    iommu_unmap_fast()
    iommu_tlb_sync()

  Looking at the source to iommu_unmap() confirms that this is
  functionally equivalent.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1806488/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp


[Kernel-packages] [Bug 1806488] Re: Support non-strict iommu mode on arm64

2022-12-15 Thread Tim Gardner
** Changed in: linux-aws (Ubuntu Jammy)
   Status: Fix Committed => In Progress

** Changed in: linux-aws (Ubuntu Jammy)
   Importance: Undecided => Medium

** Changed in: linux-aws (Ubuntu Jammy)
 Assignee: (unassigned) => Tim Gardner (timg-tpi)

** Changed in: linux-aws (Ubuntu Kinetic)
   Importance: Undecided => Medium

** Changed in: linux-aws (Ubuntu Kinetic)
   Status: Fix Committed => In Progress

** Changed in: linux-aws (Ubuntu Kinetic)
 Assignee: (unassigned) => Tim Gardner (timg-tpi)

** Also affects: linux (Ubuntu Lunar)
   Importance: Undecided
 Assignee: dann frazier (dannf)
   Status: Fix Released

** Also affects: linux-aws (Ubuntu Lunar)
   Importance: Undecided
   Status: Invalid

** Changed in: linux-aws (Ubuntu Lunar)
   Importance: Undecided => Medium

** Changed in: linux-aws (Ubuntu Lunar)
   Status: Invalid => In Progress

** Changed in: linux-aws (Ubuntu Lunar)
 Assignee: (unassigned) => Tim Gardner (timg-tpi)

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux-aws in Ubuntu.
https://bugs.launchpad.net/bugs/1806488

Title:
  Support non-strict iommu mode on arm64

Status in linux package in Ubuntu:
  Fix Released
Status in linux-aws package in Ubuntu:
  In Progress
Status in linux source package in Bionic:
  Fix Released
Status in linux-aws source package in Bionic:
  Invalid
Status in linux source package in Cosmic:
  Fix Released
Status in linux-aws source package in Cosmic:
  Invalid
Status in linux source package in Disco:
  Fix Released
Status in linux-aws source package in Disco:
  Invalid
Status in linux source package in Jammy:
  Invalid
Status in linux-aws source package in Jammy:
  In Progress
Status in linux source package in Kinetic:
  Invalid
Status in linux-aws source package in Kinetic:
  In Progress
Status in linux source package in Lunar:
  Fix Released
Status in linux-aws source package in Lunar:
  In Progress

Bug description:
  [Impact]
  The Intel IOMMU driver provides an option for strict mode. When disabled, 
batching of IOTLB flush operations is permitted, allowing the user to trade-off 
isolation for improved performance. Ubuntu's kernel currently lacks a parity 
for this feature for ARM.

  There's a significant performance gain to be had by removing the need
  to flush the IOMMU TLB on every unmap on arm64. I'm seeing a 25%
  performance gain w/ fio reads on a single NVMe device.

  This mode of operation is available for x86 via the
  "intel_iommu=strict" parameter. Upstream now exposes an equivalent
  feature for ARM platforms via the "iommu.strict=[0|1]" parameter,
  while retaining the default strict-enabled mode.

  [Test Case]
  Run fio with the following config before and after applying the patches and 
collection IOPS count. Run again after applying the patches. Finally, run a 3rd 
time after adding iommu.strict=0 to the kernel commandline.

  Performance should not regress after the update. Performance should
  further improve after adding iommu.strict=0 - but if it doesn't for
  some reason, that is not a regression.

  $ cat fio.rc
  [global]
  rw=read
  direct=1
  ioengine=libaio
  iodepth=2048
  numjobs=10
  bs=4k
  group_reporting=1
  group_reporting=1
  cpumask=0xff
  runtime=100
  loops = 1

  [job1]
  filename=/dev/nvme0n1

  [Fix]
  44f6876a00e83 iommu/arm-smmu: Support non-strict mode
  b2dfeba654cb0 iommu/io-pgtable-arm-v7s: Add support for non-strict mode
  9662b99a19abc iommu/arm-smmu-v3: Add support for non-strict mode
  b6b65ca20bc93 iommu/io-pgtable-arm: Add support for non-strict mode
  68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  2da274cdf998a iommu/dma: Add support for non-strict mode
  07fdef34d2be6 iommu/arm-smmu-v3: Implement flush_iotlb_all hook
  85c7a0f1ef624 iommu/io-pgtable-arm: Fix race handling in split_blk_unmap()

  [Regression Risk]
  Most of these patches are specific to ARM, and have been regression tested on 
both arm64 (HiSilicon D06) and armhf (QEMU virt) using "stress-ng --vm $(nproc)"

  2 patches do touch arch-indep code however:

  > 68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  Adds a new command line option and sets an attribute that iommu drivers can 
optionally react to. Doesn't change default behavior.

  > 2da274cdf998a iommu/dma: Add support for non-strict mode
  This driver is only built for arm64 and ppc64el (determined by looking at the 
build logs). Most of this patch only changes behavior in the non-default (and 
new) iommu.strict=0 case. The exception, which is called out in the commit 
message, is this hunk:

  -   WARN_ON(iommu_unmap(domain, dma_addr, size) != size);
  +   WARN_ON(iommu_unmap_fast(domain, dma_addr, size) != size);
  +   if (!cookie->fq_domain)
  +   iommu_tlb_sync(domain);

  In the default case, where fq_domain will be NULl, we are now factoring 
iommu_unmap() into:
    iommu_unmap_fast()
    iommu_tlb_sync()

  Look

[Kernel-packages] [Bug 1806488] Re: Support non-strict iommu mode on arm64

2022-11-09 Thread Tim Gardner
** Changed in: linux-aws (Ubuntu Jammy)
   Status: In Progress => Fix Committed

** Changed in: linux-aws (Ubuntu Kinetic)
   Status: In Progress => Fix Committed

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux-aws in Ubuntu.
https://bugs.launchpad.net/bugs/1806488

Title:
  Support non-strict iommu mode on arm64

Status in linux package in Ubuntu:
  Fix Released
Status in linux-aws package in Ubuntu:
  Invalid
Status in linux source package in Bionic:
  Fix Released
Status in linux-aws source package in Bionic:
  Invalid
Status in linux source package in Cosmic:
  Fix Released
Status in linux-aws source package in Cosmic:
  Invalid
Status in linux source package in Disco:
  Fix Released
Status in linux-aws source package in Disco:
  Invalid
Status in linux source package in Jammy:
  Invalid
Status in linux-aws source package in Jammy:
  Fix Committed
Status in linux source package in Kinetic:
  Invalid
Status in linux-aws source package in Kinetic:
  Fix Committed

Bug description:
  [Impact]
  The Intel IOMMU driver provides an option for strict mode. When disabled, 
batching of IOTLB flush operations is permitted, allowing the user to trade-off 
isolation for improved performance. Ubuntu's kernel currently lacks a parity 
for this feature for ARM.

  There's a significant performance gain to be had by removing the need
  to flush the IOMMU TLB on every unmap on arm64. I'm seeing a 25%
  performance gain w/ fio reads on a single NVMe device.

  This mode of operation is available for x86 via the
  "intel_iommu=strict" parameter. Upstream now exposes an equivalent
  feature for ARM platforms via the "iommu.strict=[0|1]" parameter,
  while retaining the default strict-enabled mode.

  [Test Case]
  Run fio with the following config before and after applying the patches and 
collection IOPS count. Run again after applying the patches. Finally, run a 3rd 
time after adding iommu.strict=0 to the kernel commandline.

  Performance should not regress after the update. Performance should
  further improve after adding iommu.strict=0 - but if it doesn't for
  some reason, that is not a regression.

  $ cat fio.rc
  [global]
  rw=read
  direct=1
  ioengine=libaio
  iodepth=2048
  numjobs=10
  bs=4k
  group_reporting=1
  group_reporting=1
  cpumask=0xff
  runtime=100
  loops = 1

  [job1]
  filename=/dev/nvme0n1

  [Fix]
  44f6876a00e83 iommu/arm-smmu: Support non-strict mode
  b2dfeba654cb0 iommu/io-pgtable-arm-v7s: Add support for non-strict mode
  9662b99a19abc iommu/arm-smmu-v3: Add support for non-strict mode
  b6b65ca20bc93 iommu/io-pgtable-arm: Add support for non-strict mode
  68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  2da274cdf998a iommu/dma: Add support for non-strict mode
  07fdef34d2be6 iommu/arm-smmu-v3: Implement flush_iotlb_all hook
  85c7a0f1ef624 iommu/io-pgtable-arm: Fix race handling in split_blk_unmap()

  [Regression Risk]
  Most of these patches are specific to ARM, and have been regression tested on 
both arm64 (HiSilicon D06) and armhf (QEMU virt) using "stress-ng --vm $(nproc)"

  2 patches do touch arch-indep code however:

  > 68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  Adds a new command line option and sets an attribute that iommu drivers can 
optionally react to. Doesn't change default behavior.

  > 2da274cdf998a iommu/dma: Add support for non-strict mode
  This driver is only built for arm64 and ppc64el (determined by looking at the 
build logs). Most of this patch only changes behavior in the non-default (and 
new) iommu.strict=0 case. The exception, which is called out in the commit 
message, is this hunk:

  -   WARN_ON(iommu_unmap(domain, dma_addr, size) != size);
  +   WARN_ON(iommu_unmap_fast(domain, dma_addr, size) != size);
  +   if (!cookie->fq_domain)
  +   iommu_tlb_sync(domain);

  In the default case, where fq_domain will be NULl, we are now factoring 
iommu_unmap() into:
    iommu_unmap_fast()
    iommu_tlb_sync()

  Looking at the source to iommu_unmap() confirms that this is
  functionally equivalent.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1806488/+subscriptions


-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp


[Kernel-packages] [Bug 1806488] Re: Support non-strict iommu mode on arm64

2022-10-28 Thread Tim Gardner
** Also affects: linux-aws (Ubuntu)
   Importance: Undecided
   Status: New

** Also affects: linux (Ubuntu Kinetic)
   Importance: Undecided
   Status: New

** Also affects: linux-aws (Ubuntu Kinetic)
   Importance: Undecided
   Status: New

** Also affects: linux (Ubuntu Jammy)
   Importance: Undecided
   Status: New

** Also affects: linux-aws (Ubuntu Jammy)
   Importance: Undecided
   Status: New

** Changed in: linux-aws (Ubuntu Bionic)
   Status: New => Invalid

** Changed in: linux-aws (Ubuntu Cosmic)
   Status: New => Invalid

** Changed in: linux-aws (Ubuntu Disco)
   Status: New => Invalid

** Changed in: linux-aws (Ubuntu Jammy)
   Status: New => In Progress

** Changed in: linux-aws (Ubuntu Kinetic)
   Status: New => In Progress

** Changed in: linux (Ubuntu Jammy)
   Status: New => Invalid

** Changed in: linux (Ubuntu Kinetic)
   Status: New => Invalid

** Changed in: linux-aws (Ubuntu)
   Status: New => Invalid

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux-aws in Ubuntu.
https://bugs.launchpad.net/bugs/1806488

Title:
  Support non-strict iommu mode on arm64

Status in linux package in Ubuntu:
  Fix Released
Status in linux-aws package in Ubuntu:
  Invalid
Status in linux source package in Bionic:
  Fix Released
Status in linux-aws source package in Bionic:
  Invalid
Status in linux source package in Cosmic:
  Fix Released
Status in linux-aws source package in Cosmic:
  Invalid
Status in linux source package in Disco:
  Fix Released
Status in linux-aws source package in Disco:
  Invalid
Status in linux source package in Jammy:
  Invalid
Status in linux-aws source package in Jammy:
  In Progress
Status in linux source package in Kinetic:
  Invalid
Status in linux-aws source package in Kinetic:
  In Progress

Bug description:
  [Impact]
  The Intel IOMMU driver provides an option for strict mode. When disabled, 
batching of IOTLB flush operations is permitted, allowing the user to trade-off 
isolation for improved performance. Ubuntu's kernel currently lacks a parity 
for this feature for ARM.

  There's a significant performance gain to be had by removing the need
  to flush the IOMMU TLB on every unmap on arm64. I'm seeing a 25%
  performance gain w/ fio reads on a single NVMe device.

  This mode of operation is available for x86 via the
  "intel_iommu=strict" parameter. Upstream now exposes an equivalent
  feature for ARM platforms via the "iommu.strict=[0|1]" parameter,
  while retaining the default strict-enabled mode.

  [Test Case]
  Run fio with the following config before and after applying the patches and 
collection IOPS count. Run again after applying the patches. Finally, run a 3rd 
time after adding iommu.strict=0 to the kernel commandline.

  Performance should not regress after the update. Performance should
  further improve after adding iommu.strict=0 - but if it doesn't for
  some reason, that is not a regression.

  $ cat fio.rc
  [global]
  rw=read
  direct=1
  ioengine=libaio
  iodepth=2048
  numjobs=10
  bs=4k
  group_reporting=1
  group_reporting=1
  cpumask=0xff
  runtime=100
  loops = 1

  [job1]
  filename=/dev/nvme0n1

  [Fix]
  44f6876a00e83 iommu/arm-smmu: Support non-strict mode
  b2dfeba654cb0 iommu/io-pgtable-arm-v7s: Add support for non-strict mode
  9662b99a19abc iommu/arm-smmu-v3: Add support for non-strict mode
  b6b65ca20bc93 iommu/io-pgtable-arm: Add support for non-strict mode
  68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  2da274cdf998a iommu/dma: Add support for non-strict mode
  07fdef34d2be6 iommu/arm-smmu-v3: Implement flush_iotlb_all hook
  85c7a0f1ef624 iommu/io-pgtable-arm: Fix race handling in split_blk_unmap()

  [Regression Risk]
  Most of these patches are specific to ARM, and have been regression tested on 
both arm64 (HiSilicon D06) and armhf (QEMU virt) using "stress-ng --vm $(nproc)"

  2 patches do touch arch-indep code however:

  > 68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  Adds a new command line option and sets an attribute that iommu drivers can 
optionally react to. Doesn't change default behavior.

  > 2da274cdf998a iommu/dma: Add support for non-strict mode
  This driver is only built for arm64 and ppc64el (determined by looking at the 
build logs). Most of this patch only changes behavior in the non-default (and 
new) iommu.strict=0 case. The exception, which is called out in the commit 
message, is this hunk:

  -   WARN_ON(iommu_unmap(domain, dma_addr, size) != size);
  +   WARN_ON(iommu_unmap_fast(domain, dma_addr, size) != size);
  +   if (!cookie->fq_domain)
  +   iommu_tlb_sync(domain);

  In the default case, where fq_domain will be NULl, we are now factoring 
iommu_unmap() into:
    iommu_unmap_fast()
    iommu_tlb_sync()

  Looking at the source to iommu_unmap() confirms that this is
  functionally equivalent.

To manage notifications abou

[Kernel-packages] [Bug 1806488] Re: Support non-strict iommu mode on arm64

2019-07-24 Thread Brad Figg
** Tags added: cscc

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1806488

Title:
  Support non-strict iommu mode on arm64

Status in linux package in Ubuntu:
  Fix Released
Status in linux source package in Bionic:
  Fix Released
Status in linux source package in Cosmic:
  Fix Released
Status in linux source package in Disco:
  Fix Released

Bug description:
  [Impact]
  The Intel IOMMU driver provides an option for strict mode. When disabled, 
batching of IOTLB flush operations is permitted, allowing the user to trade-off 
isolation for improved performance. Ubuntu's kernel currently lacks a parity 
for this feature for ARM.

  There's a significant performance gain to be had by removing the need
  to flush the IOMMU TLB on every unmap on arm64. I'm seeing a 25%
  performance gain w/ fio reads on a single NVMe device.

  This mode of operation is available for x86 via the
  "intel_iommu=strict" parameter. Upstream now exposes an equivalent
  feature for ARM platforms via the "iommu.strict=[0|1]" parameter,
  while retaining the default strict-enabled mode.

  [Test Case]
  Run fio with the following config before and after applying the patches and 
collection IOPS count. Run again after applying the patches. Finally, run a 3rd 
time after adding iommu.strict=0 to the kernel commandline.

  Performance should not regress after the update. Performance should
  further improve after adding iommu.strict=0 - but if it doesn't for
  some reason, that is not a regression.

  $ cat fio.rc
  [global]
  rw=read
  direct=1
  ioengine=libaio
  iodepth=2048
  numjobs=10
  bs=4k
  group_reporting=1
  group_reporting=1
  cpumask=0xff
  runtime=100
  loops = 1

  [job1]
  filename=/dev/nvme0n1

  [Fix]
  44f6876a00e83 iommu/arm-smmu: Support non-strict mode
  b2dfeba654cb0 iommu/io-pgtable-arm-v7s: Add support for non-strict mode
  9662b99a19abc iommu/arm-smmu-v3: Add support for non-strict mode
  b6b65ca20bc93 iommu/io-pgtable-arm: Add support for non-strict mode
  68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  2da274cdf998a iommu/dma: Add support for non-strict mode
  07fdef34d2be6 iommu/arm-smmu-v3: Implement flush_iotlb_all hook
  85c7a0f1ef624 iommu/io-pgtable-arm: Fix race handling in split_blk_unmap()

  [Regression Risk]
  Most of these patches are specific to ARM, and have been regression tested on 
both arm64 (HiSilicon D06) and armhf (QEMU virt) using "stress-ng --vm $(nproc)"

  2 patches do touch arch-indep code however:

  > 68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  Adds a new command line option and sets an attribute that iommu drivers can 
optionally react to. Doesn't change default behavior.

  > 2da274cdf998a iommu/dma: Add support for non-strict mode
  This driver is only built for arm64 and ppc64el (determined by looking at the 
build logs). Most of this patch only changes behavior in the non-default (and 
new) iommu.strict=0 case. The exception, which is called out in the commit 
message, is this hunk:

  -   WARN_ON(iommu_unmap(domain, dma_addr, size) != size);
  +   WARN_ON(iommu_unmap_fast(domain, dma_addr, size) != size);
  +   if (!cookie->fq_domain)
  +   iommu_tlb_sync(domain);

  In the default case, where fq_domain will be NULl, we are now factoring 
iommu_unmap() into:
    iommu_unmap_fast()
    iommu_tlb_sync()

  Looking at the source to iommu_unmap() confirms that this is
  functionally equivalent.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1806488/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp


[Kernel-packages] [Bug 1806488] Re: Support non-strict iommu mode on arm64

2019-02-04 Thread Launchpad Bug Tracker
This bug was fixed in the package linux - 4.19.0-12.13

---
linux (4.19.0-12.13) disco; urgency=medium

  * linux: 4.19.0-12.13 -proposed tracker (LP: #1813664)

  * kernel oops in bcache module (LP: #1793901)
- SAUCE: bcache: never writeback a discard operation

  * Disco update: 4.19.18 upstream stable release (LP: #1813611)
- ipv6: Consider sk_bound_dev_if when binding a socket to a v4 mapped 
address
- mlxsw: spectrum: Disable lag port TX before removing it
- mlxsw: spectrum_switchdev: Set PVID correctly during VLAN deletion
- net: dsa: mv88x6xxx: mv88e6390 errata
- net, skbuff: do not prefer skb allocation fails early
- qmi_wwan: add MTU default to qmap network interface
- ipv6: Take rcu_read_lock in __inet6_bind for mapped addresses
- net: clear skb->tstamp in bridge forwarding path
- netfilter: ipset: Allow matching on destination MAC address for mac and
  ipmac sets
- gpio: pl061: Move irq_chip definition inside struct pl061
- drm/amd/display: Guard against null stream_state in set_crc_source
- drm/amdkfd: fix interrupt spin lock
- ixgbe: allow IPsec Tx offload in VEPA mode
- platform/x86: asus-wmi: Tell the EC the OS will handle the display off
  hotkey
- e1000e: allow non-monotonic SYSTIM readings
- usb: typec: tcpm: Do not disconnect link for self powered devices
- selftests/bpf: enable (uncomment) all tests in test_libbpf.sh
- of: overlay: add missing of_node_put() after add new node to changeset
- writeback: don't decrement wb->refcnt if !wb->bdi
- serial: set suppress_bind_attrs flag only if builtin
- bpf: Allow narrow loads with offset > 0
- ALSA: oxfw: add support for APOGEE duet FireWire
- x86/mce: Fix -Wmissing-prototypes warnings
- MIPS: SiByte: Enable swiotlb for SWARM, LittleSur and BigSur
- crypto: ecc - regularize scalar for scalar multiplication
- arm64: perf: set suppress_bind_attrs flag to true
- drm/atomic-helper: Complete fake_commit->flip_done potentially earlier
- clk: meson: meson8b: fix incorrect divider mapping in cpu_scale_table
- samples: bpf: fix: error handling regarding kprobe_events
- usb: gadget: udc: renesas_usb3: add a safety connection way for
  forced_b_device
- fpga: altera-cvp: fix probing for multiple FPGAs on the bus
- selinux: always allow mounting submounts
- ASoC: pcm3168a: Don't disable pcm3168a when CONFIG_PM defined
- scsi: qedi: Check for session online before getting iSCSI TLV data.
- drm/amdgpu: Reorder uvd ring init before uvd resume
- rxe: IB_WR_REG_MR does not capture MR's iova field
- efi/libstub: Disable some warnings for x86{,_64}
- jffs2: Fix use of uninitialized delayed_work, lockdep breakage
- clk: imx: make mux parent strings const
- pstore/ram: Do not treat empty buffers as valid
- media: uvcvideo: Refactor teardown of uvc on USB disconnect
- powerpc/xmon: Fix invocation inside lock region
- powerpc/pseries/cpuidle: Fix preempt warning
- media: firewire: Fix app_info parameter type in avc_ca{,_app}_info
- ASoC: use dma_ops of parent device for acp_audio_dma
- media: venus: core: Set dma maximum segment size
- staging: erofs: fix use-after-free of on-stack `z_erofs_vle_unzip_io'
- net: call sk_dst_reset when set SO_DONTROUTE
- scsi: target: use consistent left-aligned ASCII INQUIRY data
- scsi: target/core: Make sure that target_wait_for_sess_cmds() waits long
  enough
- selftests: do not macro-expand failed assertion expressions
- arm64: kasan: Increase stack size for KASAN_EXTRA
- clk: imx6q: reset exclusive gates on init
- arm64: Fix minor issues with the dcache_by_line_op macro
- bpf: relax verifier restriction on BPF_MOV | BPF_ALU
- kconfig: fix file name and line number of warn_ignored_character()
- kconfig: fix memory leak when EOF is encountered in quotation
- mmc: atmel-mci: do not assume idle after atmci_request_end
- btrfs: volumes: Make sure there is no overlap of dev extents at mount time
- btrfs: alloc_chunk: fix more DUP stripe size handling
- btrfs: fix use-after-free due to race between replace start and cancel
- btrfs: improve error handling of btrfs_add_link
- tty/serial: do not free trasnmit buffer page under port lock
- perf intel-pt: Fix error with config term "pt=0"
- perf tests ARM: Disable breakpoint tests 32-bit
- perf svghelper: Fix unchecked usage of strncpy()
- perf parse-events: Fix unchecked usage of strncpy()
- perf vendor events intel: Fix Load_Miss_Real_Latency on SKL/SKX
- netfilter: ipt_CLUSTERIP: check MAC address when duplicate config is set
- netfilter: ipt_CLUSTERIP: remove wrong WARN_ON_ONCE in netns exit routine
- netfilter: ipt_CLUSTERIP: fix deadlock in netns exit routine
- x86/topology: Use total_cpus for max logical packages calculation
- dm crypt: use u64 instead of sector_t t

[Kernel-packages] [Bug 1806488] Re: Support non-strict iommu mode on arm64

2019-02-04 Thread Launchpad Bug Tracker
This bug was fixed in the package linux - 4.18.0-14.15

---
linux (4.18.0-14.15) cosmic; urgency=medium

  * linux: 4.18.0-14.15 -proposed tracker (LP: #1811406)

  * CPU hard lockup with rigorous writes to NVMe drive (LP: #1810998)
- blk-wbt: Avoid lock contention and thundering herd issue in wbt_wait
- blk-wbt: move disable check into get_limit()
- blk-wbt: use wq_has_sleeper() for wq active check
- blk-wbt: fix has-sleeper queueing check
- blk-wbt: abstract out end IO completion handler
- blk-wbt: improve waking of tasks

  * To reduce the Realtek USB cardreader power consumption (LP: #1811337)
- mmc: core: Introduce MMC_CAP_SYNC_RUNTIME_PM
- mmc: rtsx_usb_sdmmc: Don't runtime resume the device while changing led
- mmc: rtsx_usb_sdmmc: Re-work runtime PM support
- mmc: rtsx_usb_sdmmc: Re-work card detection/removal support
- memstick: rtsx_usb_ms: Add missing pm_runtime_disable() in probe function
- misc: rtsx_usb: Use USB remote wakeup signaling for card insertion 
detection
- memstick: Prevent memstick host from getting runtime suspended during card
  detection
- memstick: rtsx_usb_ms: Use ms_dev() helper
- memstick: rtsx_usb_ms: Support runtime power management

  * Support non-strict iommu mode on arm64 (LP: #1806488)
- iommu/io-pgtable-arm: Fix race handling in split_blk_unmap()
- iommu/arm-smmu-v3: Implement flush_iotlb_all hook
- iommu/dma: Add support for non-strict mode
- iommu: Add "iommu.strict" command line option
- iommu/io-pgtable-arm: Add support for non-strict mode
- iommu/arm-smmu-v3: Add support for non-strict mode
- iommu/io-pgtable-arm-v7s: Add support for non-strict mode
- iommu/arm-smmu: Support non-strict mode

  * [Regression] crashkernel fails on HiSilicon D05 (LP: #1806766)
- efi: honour memory reservations passed via a linux specific config table
- efi/arm: libstub: add a root memreserve config table
- efi: add API to reserve memory persistently across kexec reboot
- irqchip/gic-v3-its: Change initialization ordering for LPIs
- irqchip/gic-v3-its: Simplify LPI_PENDBASE_SZ usage
- irqchip/gic-v3-its: Split property table clearing from allocation
- irqchip/gic-v3-its: Move pending table allocation to init time
- irqchip/gic-v3-its: Keep track of property table's PA and VA
- irqchip/gic-v3-its: Allow use of pre-programmed LPI tables
- irqchip/gic-v3-its: Use pre-programmed redistributor tables with kdump
  kernels
- irqchip/gic-v3-its: Check that all RDs have the same property table
- irqchip/gic-v3-its: Register LPI tables with EFI config table
- irqchip/gic-v3-its: Allow use of LPI tables in reserved memory
- arm64: memblock: don't permit memblock resizing until linear mapping is up
- efi/arm: Defer persistent reservations until after paging_init()
- efi: Permit calling efi_mem_reserve_persistent() from atomic context
- efi: Prevent GICv3 WARN() by mapping the memreserve table before first use

  * ELAN900C:00 04F3:2844 touchscreen doesn't work (LP: #1811335)
- pinctrl: cannonlake: Fix community ordering for H variant
- pinctrl: cannonlake: Fix HOSTSW_OWN register offset of H variant

  * Add Cavium ThunderX2 SoC UNCORE PMU driver (LP: #1811200)
- Documentation: perf: Add documentation for ThunderX2 PMU uncore driver
- drivers/perf: Add Cavium ThunderX2 SoC UNCORE PMU driver
- [Config] New config CONFIG_THUNDERX2_PMU=m

  * iptables connlimit allows more connections than the limit when using
multiple CPUs (LP: #1811094)
- netfilter: nf_conncount: don't skip eviction when age is negative

  * CVE-2018-16882
- KVM: Fix UAF in nested posted interrupt processing

  * Cannot initialize ATA disk if IDENTIFY command fails (LP: #1809046)
- scsi: libsas: check the ata device status by ata_dev_enabled()

  * scsi: libsas: fix a race condition when smp task timeout (LP: #1808912)
- scsi: libsas: fix a race condition when smp task timeout

  * CVE-2018-14625
- vhost/vsock: fix use-after-free in network stack callers

  * Fix and issue that LG I2C touchscreen stops working after reboot
(LP: #1805085)
- HID: i2c-hid: Disable runtime PM for LG touchscreen

  * Drivers: hv: vmbus: Offload the handling of channels to two workqueues
(LP: #1807757)
- Drivers: hv: vmbus: check the creation_status in vmbus_establish_gpadl()
- Drivers: hv: vmbus: Offload the handling of channels to two workqueues

  * Disable LPM for Raydium Touchscreens (LP: #1802248)
- USB: quirks: Add no-lpm quirk for Raydium touchscreens

  * Power leakage at S5 with Qualcomm Atheros QCA9377 802.11ac Wireless Network
Adapter (LP: #1805607)
- SAUCE: ath10k: provide reset function for QCA9377 chip

  * CVE-2018-19407
- KVM: X86: Fix scan ioapic use-before-initialization

  * Fix USB2 device wrongly detected as USB1 (LP: #1806534)
- xhci: Add quirk to workaround the errata

[Kernel-packages] [Bug 1806488] Re: Support non-strict iommu mode on arm64

2019-01-28 Thread Launchpad Bug Tracker
This bug was fixed in the package linux - 4.15.0-44.47

---
linux (4.15.0-44.47) bionic; urgency=medium

  * linux: 4.15.0-44.47 -proposed tracker (LP: #1811419)

  * Packaging resync (LP: #1786013)
- [Packaging] update helper scripts

  * CPU hard lockup with rigorous writes to NVMe drive (LP: #1810998)
- blk-wbt: pass in enum wbt_flags to get_rq_wait()
- blk-wbt: Avoid lock contention and thundering herd issue in wbt_wait
- blk-wbt: move disable check into get_limit()
- blk-wbt: use wq_has_sleeper() for wq active check
- blk-wbt: fix has-sleeper queueing check
- blk-wbt: abstract out end IO completion handler
- blk-wbt: improve waking of tasks

  * To reduce the Realtek USB cardreader power consumption (LP: #1811337)
- mmc: sdhci: Disable 1.8v modes (HS200/HS400/UHS) if controller can't 
support
  1.8v
- mmc: core: Introduce MMC_CAP_SYNC_RUNTIME_PM
- mmc: rtsx_usb_sdmmc: Don't runtime resume the device while changing led
- mmc: rtsx_usb: Use MMC_CAP2_NO_SDIO
- mmc: rtsx_usb: Enable MMC_CAP_ERASE to allow erase/discard/trim requests
- mmc: rtsx_usb_sdmmc: Re-work runtime PM support
- mmc: rtsx_usb_sdmmc: Re-work card detection/removal support
- memstick: rtsx_usb_ms: Add missing pm_runtime_disable() in probe function
- misc: rtsx_usb: Use USB remote wakeup signaling for card insertion 
detection
- memstick: Prevent memstick host from getting runtime suspended during card
  detection
- memstick: rtsx_usb_ms: Use ms_dev() helper
- memstick: rtsx_usb_ms: Support runtime power management

  * Support non-strict iommu mode on arm64 (LP: #1806488)
- iommu/io-pgtable-arm: Fix race handling in split_blk_unmap()
- iommu/arm-smmu-v3: Implement flush_iotlb_all hook
- iommu/dma: Add support for non-strict mode
- iommu: Add "iommu.strict" command line option
- iommu/io-pgtable-arm: Add support for non-strict mode
- iommu/arm-smmu-v3: Add support for non-strict mode
- iommu/io-pgtable-arm-v7s: Add support for non-strict mode
- iommu/arm-smmu: Support non-strict mode

  * ELAN900C:00 04F3:2844 touchscreen doesn't work (LP: #1811335)
- pinctrl: cannonlake: Fix community ordering for H variant
- pinctrl: cannonlake: Fix HOSTSW_OWN register offset of H variant

  * Add Cavium ThunderX2 SoC UNCORE PMU driver (LP: #1811200)
- perf: Export perf_event_update_userpage
- Documentation: perf: Add documentation for ThunderX2 PMU uncore driver
- drivers/perf: Add Cavium ThunderX2 SoC UNCORE PMU driver
- [Config] New config CONFIG_THUNDERX2_PMU=m

  * Update hisilicon SoC-specific drivers (LP: #1810457)
- SAUCE: Revert "net: hns3: Updates RX packet info fetch in case of multi 
BD"
- Revert "UBUNTU: SAUCE: {topost} net: hns3: separate roce from nic when
  resetting"
- Revert "UBUNTU: SAUCE: {topost} net: hns3: Use roce handle when calling 
roce
  callback function"
- Revert "UBUNTU: SAUCE: {topost} net: hns3: Add calling roce callback
  function when link status change"
- Revert "UBUNTU: SAUCE: {topost} net: hns3: optimize the process of 
notifying
  roce client"
- Revert "UBUNTU: SAUCE: {topost} net: hns3: Add pf reset for hip08 RoCE"
- scsi: hisi_sas: Remove depends on HAS_DMA in case of platform dependency
- ethernet: hisilicon: hns: hns_dsaf_mac: Use generic eth_broadcast_addr
- scsi: hisi_sas: consolidate command check in hisi_sas_get_ata_protocol()
- scsi: hisi_sas: remove some unneeded structure members
- scsi: hisi_sas: Introduce hisi_sas_phy_set_linkrate()
- net: hns: Fix the process of adding broadcast addresses to tcam
- net: hns3: remove redundant variable 'protocol'
- scsi: hisi_sas: Drop hisi_sas_slot_abort()
- net: hns: Make many functions static
- net: hns: make hns_dsaf_roce_reset non static
- net: hisilicon: hns: Replace mdelay() with msleep()
- net: hns3: fix return value error while hclge_cmd_csq_clean failed
- net: hns: remove redundant variables 'max_frm' and 'tmp_mac_key'
- net: hns: Mark expected switch fall-through
- net: hns3: Mark expected switch fall-through
- net: hns3: Remove tx ring BD len register in hns3_enet
- net: hns: modify variable type in hns_nic_reuse_page
- net: hns: use eth_get_headlen interface instead of hns_nic_get_headlen
- net: hns3: modify variable type in hns3_nic_reuse_page
- net: hns3: Fix for vf vlan delete failed problem
- net: hns3: Fix for multicast failure
- net: hns3: Fix error of checking used vlan id
- net: hns3: Implement shutdown ops in hns3 pci driver
- net: hns3: Fix for loopback selftest failed problem
- net: hns3: Fix ping exited problem when doing lp selftest
- net: hns3: Preserve vlan 0 in hardware table
- net: hns3: Only update mac configuation when necessary
- net: hns3: Change the dst mac addr of loopback packet
- net: hns3: Remove redundant codes of query ad

[Kernel-packages] [Bug 1806488] Re: Support non-strict iommu mode on arm64

2019-01-17 Thread Ike Panhc
Performance on NVMe has increased a lot.

-update kernel
Run status group 0 (all jobs):
   READ: bw=1358MiB/s (1424MB/s), 1358MiB/s-1358MiB/s (1424MB/s-1424MB/s), 
io=133GiB (142GB), run=19-19msec

-proposed kernel
Run status group 0 (all jobs):
   READ: bw=1406MiB/s (1475MB/s), 1406MiB/s-1406MiB/s (1475MB/s-1475MB/s), 
io=137GiB (147GB), run=15-15msec

-proposed kernel with iommu.strict=0
Run status group 0 (all jobs):
   READ: bw=1732MiB/s (1816MB/s), 1732MiB/s-1732MiB/s (1816MB/s-1816MB/s), 
io=169GiB (182GB), run=14-14msec


** Tags removed: verification-needed-bionic verification-needed-cosmic
** Tags added: verification-done-bionic verification-done-cosmic

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1806488

Title:
  Support non-strict iommu mode on arm64

Status in linux package in Ubuntu:
  Fix Committed
Status in linux source package in Bionic:
  Fix Committed
Status in linux source package in Cosmic:
  Fix Committed
Status in linux source package in Disco:
  Fix Committed

Bug description:
  [Impact]
  The Intel IOMMU driver provides an option for strict mode. When disabled, 
batching of IOTLB flush operations is permitted, allowing the user to trade-off 
isolation for improved performance. Ubuntu's kernel currently lacks a parity 
for this feature for ARM.

  There's a significant performance gain to be had by removing the need
  to flush the IOMMU TLB on every unmap on arm64. I'm seeing a 25%
  performance gain w/ fio reads on a single NVMe device.

  This mode of operation is available for x86 via the
  "intel_iommu=strict" parameter. Upstream now exposes an equivalent
  feature for ARM platforms via the "iommu.strict=[0|1]" parameter,
  while retaining the default strict-enabled mode.

  [Test Case]
  Run fio with the following config before and after applying the patches and 
collection IOPS count. Run again after applying the patches. Finally, run a 3rd 
time after adding iommu.strict=0 to the kernel commandline.

  Performance should not regress after the update. Performance should
  further improve after adding iommu.strict=0 - but if it doesn't for
  some reason, that is not a regression.

  $ cat fio.rc
  [global]
  rw=read
  direct=1
  ioengine=libaio
  iodepth=2048
  numjobs=10
  bs=4k
  group_reporting=1
  group_reporting=1
  cpumask=0xff
  runtime=100
  loops = 1

  [job1]
  filename=/dev/nvme0n1

  [Fix]
  44f6876a00e83 iommu/arm-smmu: Support non-strict mode
  b2dfeba654cb0 iommu/io-pgtable-arm-v7s: Add support for non-strict mode
  9662b99a19abc iommu/arm-smmu-v3: Add support for non-strict mode
  b6b65ca20bc93 iommu/io-pgtable-arm: Add support for non-strict mode
  68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  2da274cdf998a iommu/dma: Add support for non-strict mode
  07fdef34d2be6 iommu/arm-smmu-v3: Implement flush_iotlb_all hook
  85c7a0f1ef624 iommu/io-pgtable-arm: Fix race handling in split_blk_unmap()

  [Regression Risk]
  Most of these patches are specific to ARM, and have been regression tested on 
both arm64 (HiSilicon D06) and armhf (QEMU virt) using "stress-ng --vm $(nproc)"

  2 patches do touch arch-indep code however:

  > 68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  Adds a new command line option and sets an attribute that iommu drivers can 
optionally react to. Doesn't change default behavior.

  > 2da274cdf998a iommu/dma: Add support for non-strict mode
  This driver is only built for arm64 and ppc64el (determined by looking at the 
build logs). Most of this patch only changes behavior in the non-default (and 
new) iommu.strict=0 case. The exception, which is called out in the commit 
message, is this hunk:

  -   WARN_ON(iommu_unmap(domain, dma_addr, size) != size);
  +   WARN_ON(iommu_unmap_fast(domain, dma_addr, size) != size);
  +   if (!cookie->fq_domain)
  +   iommu_tlb_sync(domain);

  In the default case, where fq_domain will be NULl, we are now factoring 
iommu_unmap() into:
    iommu_unmap_fast()
    iommu_tlb_sync()

  Looking at the source to iommu_unmap() confirms that this is
  functionally equivalent.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1806488/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp


[Kernel-packages] [Bug 1806488] Re: Support non-strict iommu mode on arm64

2019-01-16 Thread dann frazier
** Description changed:

  [Impact]
  The Intel IOMMU driver provides an option for strict mode. When disabled, 
batching of IOTLB flush operations is permitted, allowing the user to trade-off 
isolation for improved performance. Ubuntu's kernel currently lacks a parity 
for this feature for ARM.
  
  There's a significant performance gain to be had by removing the need to
  flush the IOMMU TLB on every unmap on arm64. I'm seeing a 25%
  performance gain w/ fio reads on a single NVMe device.
  
  This mode of operation is available for x86 via the "intel_iommu=strict"
  parameter. Upstream now exposes an equivalent feature for ARM platforms
  via the "iommu.strict=[0|1]" parameter, while retaining the default
  strict-enabled mode.
  
  [Test Case]
+ Run fio with the following config before and after applying the patches and 
collection IOPS count. Run again after applying the patches. Finally, run a 3rd 
time after adding iommu.strict=0 to the kernel commandline.
+ 
+ Performance should not regress after the update. Performance should
+ further improve after adding iommu.strict=0 - but if it doesn't for some
+ reason, that is not a regression.
+ 
  $ cat fio.rc
  [global]
  rw=read
  direct=1
  ioengine=libaio
  iodepth=2048
  numjobs=10
  bs=4k
  group_reporting=1
  group_reporting=1
  cpumask=0xff
  runtime=100
  loops = 1
  
  [job1]
  filename=/dev/nvme0n1
  
  [Fix]
  44f6876a00e83 iommu/arm-smmu: Support non-strict mode
  b2dfeba654cb0 iommu/io-pgtable-arm-v7s: Add support for non-strict mode
  9662b99a19abc iommu/arm-smmu-v3: Add support for non-strict mode
  b6b65ca20bc93 iommu/io-pgtable-arm: Add support for non-strict mode
  68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  2da274cdf998a iommu/dma: Add support for non-strict mode
  07fdef34d2be6 iommu/arm-smmu-v3: Implement flush_iotlb_all hook
  85c7a0f1ef624 iommu/io-pgtable-arm: Fix race handling in split_blk_unmap()
  
  [Regression Risk]
  Most of these patches are specific to ARM, and have been regression tested on 
both arm64 (HiSilicon D06) and armhf (QEMU virt) using "stress-ng --vm $(nproc)"
  
  2 patches do touch arch-indep code however:
  
  > 68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  Adds a new command line option and sets an attribute that iommu drivers can 
optionally react to. Doesn't change default behavior.
  
  > 2da274cdf998a iommu/dma: Add support for non-strict mode
  This driver is only built for arm64 and ppc64el (determined by looking at the 
build logs). Most of this patch only changes behavior in the non-default (and 
new) iommu.strict=0 case. The exception, which is called out in the commit 
message, is this hunk:
  
  -   WARN_ON(iommu_unmap(domain, dma_addr, size) != size);
  +   WARN_ON(iommu_unmap_fast(domain, dma_addr, size) != size);
  +   if (!cookie->fq_domain)
  +   iommu_tlb_sync(domain);
  
- 
  In the default case, where fq_domain will be NULl, we are now factoring 
iommu_unmap() into:
-   iommu_unmap_fast()
-   iommu_tlb_sync()
+   iommu_unmap_fast()
+   iommu_tlb_sync()
  
  Looking at the source to iommu_unmap() confirms that this is
  functionally equivalent.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1806488

Title:
  Support non-strict iommu mode on arm64

Status in linux package in Ubuntu:
  Fix Committed
Status in linux source package in Bionic:
  Fix Committed
Status in linux source package in Cosmic:
  Fix Committed
Status in linux source package in Disco:
  Fix Committed

Bug description:
  [Impact]
  The Intel IOMMU driver provides an option for strict mode. When disabled, 
batching of IOTLB flush operations is permitted, allowing the user to trade-off 
isolation for improved performance. Ubuntu's kernel currently lacks a parity 
for this feature for ARM.

  There's a significant performance gain to be had by removing the need
  to flush the IOMMU TLB on every unmap on arm64. I'm seeing a 25%
  performance gain w/ fio reads on a single NVMe device.

  This mode of operation is available for x86 via the
  "intel_iommu=strict" parameter. Upstream now exposes an equivalent
  feature for ARM platforms via the "iommu.strict=[0|1]" parameter,
  while retaining the default strict-enabled mode.

  [Test Case]
  Run fio with the following config before and after applying the patches and 
collection IOPS count. Run again after applying the patches. Finally, run a 3rd 
time after adding iommu.strict=0 to the kernel commandline.

  Performance should not regress after the update. Performance should
  further improve after adding iommu.strict=0 - but if it doesn't for
  some reason, that is not a regression.

  $ cat fio.rc
  [global]
  rw=read
  direct=1
  ioengine=libaio
  iodepth=2048
  numjobs=10
  bs=4k
  group_reporting=1
  group_reporting=1
  cpumask=0xff
  runtime=100
  loops = 1

  [job1]
  filename=/dev/nvme0n1

  [Fix]
 

[Kernel-packages] [Bug 1806488] Re: Support non-strict iommu mode on arm64

2019-01-15 Thread Brad Figg
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-
bionic' to 'verification-done-bionic'. If the problem still exists,
change the tag 'verification-needed-bionic' to 'verification-failed-
bionic'.

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!

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1806488

Title:
  Support non-strict iommu mode on arm64

Status in linux package in Ubuntu:
  Fix Committed
Status in linux source package in Bionic:
  Fix Committed
Status in linux source package in Cosmic:
  Fix Committed
Status in linux source package in Disco:
  Fix Committed

Bug description:
  [Impact]
  The Intel IOMMU driver provides an option for strict mode. When disabled, 
batching of IOTLB flush operations is permitted, allowing the user to trade-off 
isolation for improved performance. Ubuntu's kernel currently lacks a parity 
for this feature for ARM.

  There's a significant performance gain to be had by removing the need
  to flush the IOMMU TLB on every unmap on arm64. I'm seeing a 25%
  performance gain w/ fio reads on a single NVMe device.

  This mode of operation is available for x86 via the
  "intel_iommu=strict" parameter. Upstream now exposes an equivalent
  feature for ARM platforms via the "iommu.strict=[0|1]" parameter,
  while retaining the default strict-enabled mode.

  [Test Case]
  $ cat fio.rc
  [global]
  rw=read
  direct=1
  ioengine=libaio
  iodepth=2048
  numjobs=10
  bs=4k
  group_reporting=1
  group_reporting=1
  cpumask=0xff
  runtime=100
  loops = 1

  [job1]
  filename=/dev/nvme0n1

  [Fix]
  44f6876a00e83 iommu/arm-smmu: Support non-strict mode
  b2dfeba654cb0 iommu/io-pgtable-arm-v7s: Add support for non-strict mode
  9662b99a19abc iommu/arm-smmu-v3: Add support for non-strict mode
  b6b65ca20bc93 iommu/io-pgtable-arm: Add support for non-strict mode
  68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  2da274cdf998a iommu/dma: Add support for non-strict mode
  07fdef34d2be6 iommu/arm-smmu-v3: Implement flush_iotlb_all hook
  85c7a0f1ef624 iommu/io-pgtable-arm: Fix race handling in split_blk_unmap()

  [Regression Risk]
  Most of these patches are specific to ARM, and have been regression tested on 
both arm64 (HiSilicon D06) and armhf (QEMU virt) using "stress-ng --vm $(nproc)"

  2 patches do touch arch-indep code however:

  > 68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  Adds a new command line option and sets an attribute that iommu drivers can 
optionally react to. Doesn't change default behavior.

  > 2da274cdf998a iommu/dma: Add support for non-strict mode
  This driver is only built for arm64 and ppc64el (determined by looking at the 
build logs). Most of this patch only changes behavior in the non-default (and 
new) iommu.strict=0 case. The exception, which is called out in the commit 
message, is this hunk:

  -   WARN_ON(iommu_unmap(domain, dma_addr, size) != size);
  +   WARN_ON(iommu_unmap_fast(domain, dma_addr, size) != size);
  +   if (!cookie->fq_domain)
  +   iommu_tlb_sync(domain);

  
  In the default case, where fq_domain will be NULl, we are now factoring 
iommu_unmap() into:
iommu_unmap_fast()
iommu_tlb_sync()

  Looking at the source to iommu_unmap() confirms that this is
  functionally equivalent.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1806488/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp


[Kernel-packages] [Bug 1806488] Re: Support non-strict iommu mode on arm64

2019-01-15 Thread Brad Figg
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-
cosmic' to 'verification-done-cosmic'. If the problem still exists,
change the tag 'verification-needed-cosmic' to 'verification-failed-
cosmic'.

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-cosmic

** Tags added: verification-needed-bionic

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1806488

Title:
  Support non-strict iommu mode on arm64

Status in linux package in Ubuntu:
  Fix Committed
Status in linux source package in Bionic:
  Fix Committed
Status in linux source package in Cosmic:
  Fix Committed
Status in linux source package in Disco:
  Fix Committed

Bug description:
  [Impact]
  The Intel IOMMU driver provides an option for strict mode. When disabled, 
batching of IOTLB flush operations is permitted, allowing the user to trade-off 
isolation for improved performance. Ubuntu's kernel currently lacks a parity 
for this feature for ARM.

  There's a significant performance gain to be had by removing the need
  to flush the IOMMU TLB on every unmap on arm64. I'm seeing a 25%
  performance gain w/ fio reads on a single NVMe device.

  This mode of operation is available for x86 via the
  "intel_iommu=strict" parameter. Upstream now exposes an equivalent
  feature for ARM platforms via the "iommu.strict=[0|1]" parameter,
  while retaining the default strict-enabled mode.

  [Test Case]
  $ cat fio.rc
  [global]
  rw=read
  direct=1
  ioengine=libaio
  iodepth=2048
  numjobs=10
  bs=4k
  group_reporting=1
  group_reporting=1
  cpumask=0xff
  runtime=100
  loops = 1

  [job1]
  filename=/dev/nvme0n1

  [Fix]
  44f6876a00e83 iommu/arm-smmu: Support non-strict mode
  b2dfeba654cb0 iommu/io-pgtable-arm-v7s: Add support for non-strict mode
  9662b99a19abc iommu/arm-smmu-v3: Add support for non-strict mode
  b6b65ca20bc93 iommu/io-pgtable-arm: Add support for non-strict mode
  68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  2da274cdf998a iommu/dma: Add support for non-strict mode
  07fdef34d2be6 iommu/arm-smmu-v3: Implement flush_iotlb_all hook
  85c7a0f1ef624 iommu/io-pgtable-arm: Fix race handling in split_blk_unmap()

  [Regression Risk]
  Most of these patches are specific to ARM, and have been regression tested on 
both arm64 (HiSilicon D06) and armhf (QEMU virt) using "stress-ng --vm $(nproc)"

  2 patches do touch arch-indep code however:

  > 68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  Adds a new command line option and sets an attribute that iommu drivers can 
optionally react to. Doesn't change default behavior.

  > 2da274cdf998a iommu/dma: Add support for non-strict mode
  This driver is only built for arm64 and ppc64el (determined by looking at the 
build logs). Most of this patch only changes behavior in the non-default (and 
new) iommu.strict=0 case. The exception, which is called out in the commit 
message, is this hunk:

  -   WARN_ON(iommu_unmap(domain, dma_addr, size) != size);
  +   WARN_ON(iommu_unmap_fast(domain, dma_addr, size) != size);
  +   if (!cookie->fq_domain)
  +   iommu_tlb_sync(domain);

  
  In the default case, where fq_domain will be NULl, we are now factoring 
iommu_unmap() into:
iommu_unmap_fast()
iommu_tlb_sync()

  Looking at the source to iommu_unmap() confirms that this is
  functionally equivalent.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1806488/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp


[Kernel-packages] [Bug 1806488] Re: Support non-strict iommu mode on arm64

2019-01-11 Thread Kleber Sacilotto de Souza
** Changed in: linux (Ubuntu Bionic)
   Status: In Progress => Fix Committed

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1806488

Title:
  Support non-strict iommu mode on arm64

Status in linux package in Ubuntu:
  Fix Committed
Status in linux source package in Bionic:
  Fix Committed
Status in linux source package in Cosmic:
  Fix Committed
Status in linux source package in Disco:
  Fix Committed

Bug description:
  [Impact]
  The Intel IOMMU driver provides an option for strict mode. When disabled, 
batching of IOTLB flush operations is permitted, allowing the user to trade-off 
isolation for improved performance. Ubuntu's kernel currently lacks a parity 
for this feature for ARM.

  There's a significant performance gain to be had by removing the need
  to flush the IOMMU TLB on every unmap on arm64. I'm seeing a 25%
  performance gain w/ fio reads on a single NVMe device.

  This mode of operation is available for x86 via the
  "intel_iommu=strict" parameter. Upstream now exposes an equivalent
  feature for ARM platforms via the "iommu.strict=[0|1]" parameter,
  while retaining the default strict-enabled mode.

  [Test Case]
  $ cat fio.rc
  [global]
  rw=read
  direct=1
  ioengine=libaio
  iodepth=2048
  numjobs=10
  bs=4k
  group_reporting=1
  group_reporting=1
  cpumask=0xff
  runtime=100
  loops = 1

  [job1]
  filename=/dev/nvme0n1

  [Fix]
  44f6876a00e83 iommu/arm-smmu: Support non-strict mode
  b2dfeba654cb0 iommu/io-pgtable-arm-v7s: Add support for non-strict mode
  9662b99a19abc iommu/arm-smmu-v3: Add support for non-strict mode
  b6b65ca20bc93 iommu/io-pgtable-arm: Add support for non-strict mode
  68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  2da274cdf998a iommu/dma: Add support for non-strict mode
  07fdef34d2be6 iommu/arm-smmu-v3: Implement flush_iotlb_all hook
  85c7a0f1ef624 iommu/io-pgtable-arm: Fix race handling in split_blk_unmap()

  [Regression Risk]
  Most of these patches are specific to ARM, and have been regression tested on 
both arm64 (HiSilicon D06) and armhf (QEMU virt) using "stress-ng --vm $(nproc)"

  2 patches do touch arch-indep code however:

  > 68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  Adds a new command line option and sets an attribute that iommu drivers can 
optionally react to. Doesn't change default behavior.

  > 2da274cdf998a iommu/dma: Add support for non-strict mode
  This driver is only built for arm64 and ppc64el (determined by looking at the 
build logs). Most of this patch only changes behavior in the non-default (and 
new) iommu.strict=0 case. The exception, which is called out in the commit 
message, is this hunk:

  -   WARN_ON(iommu_unmap(domain, dma_addr, size) != size);
  +   WARN_ON(iommu_unmap_fast(domain, dma_addr, size) != size);
  +   if (!cookie->fq_domain)
  +   iommu_tlb_sync(domain);

  
  In the default case, where fq_domain will be NULl, we are now factoring 
iommu_unmap() into:
iommu_unmap_fast()
iommu_tlb_sync()

  Looking at the source to iommu_unmap() confirms that this is
  functionally equivalent.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1806488/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp


[Kernel-packages] [Bug 1806488] Re: Support non-strict iommu mode on arm64

2019-01-11 Thread Kleber Sacilotto de Souza
** Changed in: linux (Ubuntu Cosmic)
   Status: In Progress => Fix Committed

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1806488

Title:
  Support non-strict iommu mode on arm64

Status in linux package in Ubuntu:
  Fix Committed
Status in linux source package in Bionic:
  In Progress
Status in linux source package in Cosmic:
  Fix Committed
Status in linux source package in Disco:
  Fix Committed

Bug description:
  [Impact]
  The Intel IOMMU driver provides an option for strict mode. When disabled, 
batching of IOTLB flush operations is permitted, allowing the user to trade-off 
isolation for improved performance. Ubuntu's kernel currently lacks a parity 
for this feature for ARM.

  There's a significant performance gain to be had by removing the need
  to flush the IOMMU TLB on every unmap on arm64. I'm seeing a 25%
  performance gain w/ fio reads on a single NVMe device.

  This mode of operation is available for x86 via the
  "intel_iommu=strict" parameter. Upstream now exposes an equivalent
  feature for ARM platforms via the "iommu.strict=[0|1]" parameter,
  while retaining the default strict-enabled mode.

  [Test Case]
  $ cat fio.rc
  [global]
  rw=read
  direct=1
  ioengine=libaio
  iodepth=2048
  numjobs=10
  bs=4k
  group_reporting=1
  group_reporting=1
  cpumask=0xff
  runtime=100
  loops = 1

  [job1]
  filename=/dev/nvme0n1

  [Fix]
  44f6876a00e83 iommu/arm-smmu: Support non-strict mode
  b2dfeba654cb0 iommu/io-pgtable-arm-v7s: Add support for non-strict mode
  9662b99a19abc iommu/arm-smmu-v3: Add support for non-strict mode
  b6b65ca20bc93 iommu/io-pgtable-arm: Add support for non-strict mode
  68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  2da274cdf998a iommu/dma: Add support for non-strict mode
  07fdef34d2be6 iommu/arm-smmu-v3: Implement flush_iotlb_all hook
  85c7a0f1ef624 iommu/io-pgtable-arm: Fix race handling in split_blk_unmap()

  [Regression Risk]
  Most of these patches are specific to ARM, and have been regression tested on 
both arm64 (HiSilicon D06) and armhf (QEMU virt) using "stress-ng --vm $(nproc)"

  2 patches do touch arch-indep code however:

  > 68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  Adds a new command line option and sets an attribute that iommu drivers can 
optionally react to. Doesn't change default behavior.

  > 2da274cdf998a iommu/dma: Add support for non-strict mode
  This driver is only built for arm64 and ppc64el (determined by looking at the 
build logs). Most of this patch only changes behavior in the non-default (and 
new) iommu.strict=0 case. The exception, which is called out in the commit 
message, is this hunk:

  -   WARN_ON(iommu_unmap(domain, dma_addr, size) != size);
  +   WARN_ON(iommu_unmap_fast(domain, dma_addr, size) != size);
  +   if (!cookie->fq_domain)
  +   iommu_tlb_sync(domain);

  
  In the default case, where fq_domain will be NULl, we are now factoring 
iommu_unmap() into:
iommu_unmap_fast()
iommu_tlb_sync()

  Looking at the source to iommu_unmap() confirms that this is
  functionally equivalent.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1806488/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp


[Kernel-packages] [Bug 1806488] Re: Support non-strict iommu mode on arm64

2019-01-09 Thread Seth Forshee
** Changed in: linux (Ubuntu Disco)
   Status: In Progress => Fix Committed

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1806488

Title:
  Support non-strict iommu mode on arm64

Status in linux package in Ubuntu:
  Fix Committed
Status in linux source package in Bionic:
  In Progress
Status in linux source package in Cosmic:
  In Progress
Status in linux source package in Disco:
  Fix Committed

Bug description:
  [Impact]
  The Intel IOMMU driver provides an option for strict mode. When disabled, 
batching of IOTLB flush operations is permitted, allowing the user to trade-off 
isolation for improved performance. Ubuntu's kernel currently lacks a parity 
for this feature for ARM.

  There's a significant performance gain to be had by removing the need
  to flush the IOMMU TLB on every unmap on arm64. I'm seeing a 25%
  performance gain w/ fio reads on a single NVMe device.

  This mode of operation is available for x86 via the
  "intel_iommu=strict" parameter. Upstream now exposes an equivalent
  feature for ARM platforms via the "iommu.strict=[0|1]" parameter,
  while retaining the default strict-enabled mode.

  [Test Case]
  $ cat fio.rc
  [global]
  rw=read
  direct=1
  ioengine=libaio
  iodepth=2048
  numjobs=10
  bs=4k
  group_reporting=1
  group_reporting=1
  cpumask=0xff
  runtime=100
  loops = 1

  [job1]
  filename=/dev/nvme0n1

  [Fix]
  44f6876a00e83 iommu/arm-smmu: Support non-strict mode
  b2dfeba654cb0 iommu/io-pgtable-arm-v7s: Add support for non-strict mode
  9662b99a19abc iommu/arm-smmu-v3: Add support for non-strict mode
  b6b65ca20bc93 iommu/io-pgtable-arm: Add support for non-strict mode
  68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  2da274cdf998a iommu/dma: Add support for non-strict mode
  07fdef34d2be6 iommu/arm-smmu-v3: Implement flush_iotlb_all hook
  85c7a0f1ef624 iommu/io-pgtable-arm: Fix race handling in split_blk_unmap()

  [Regression Risk]
  Most of these patches are specific to ARM, and have been regression tested on 
both arm64 (HiSilicon D06) and armhf (QEMU virt) using "stress-ng --vm $(nproc)"

  2 patches do touch arch-indep code however:

  > 68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  Adds a new command line option and sets an attribute that iommu drivers can 
optionally react to. Doesn't change default behavior.

  > 2da274cdf998a iommu/dma: Add support for non-strict mode
  This driver is only built for arm64 and ppc64el (determined by looking at the 
build logs). Most of this patch only changes behavior in the non-default (and 
new) iommu.strict=0 case. The exception, which is called out in the commit 
message, is this hunk:

  -   WARN_ON(iommu_unmap(domain, dma_addr, size) != size);
  +   WARN_ON(iommu_unmap_fast(domain, dma_addr, size) != size);
  +   if (!cookie->fq_domain)
  +   iommu_tlb_sync(domain);

  
  In the default case, where fq_domain will be NULl, we are now factoring 
iommu_unmap() into:
iommu_unmap_fast()
iommu_tlb_sync()

  Looking at the source to iommu_unmap() confirms that this is
  functionally equivalent.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1806488/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp


[Kernel-packages] [Bug 1806488] Re: Support non-strict iommu mode on arm64

2018-12-21 Thread dann frazier
** Changed in: linux (Ubuntu Bionic)
   Status: New => In Progress

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1806488

Title:
  Support non-strict iommu mode on arm64

Status in linux package in Ubuntu:
  In Progress
Status in linux source package in Bionic:
  In Progress
Status in linux source package in Cosmic:
  In Progress
Status in linux source package in Disco:
  In Progress

Bug description:
  [Impact]
  The Intel IOMMU driver provides an option for strict mode. When disabled, 
batching of IOTLB flush operations is permitted, allowing the user to trade-off 
isolation for improved performance. Ubuntu's kernel currently lacks a parity 
for this feature for ARM.

  There's a significant performance gain to be had by removing the need
  to flush the IOMMU TLB on every unmap on arm64. I'm seeing a 25%
  performance gain w/ fio reads on a single NVMe device.

  This mode of operation is available for x86 via the
  "intel_iommu=strict" parameter. Upstream now exposes an equivalent
  feature for ARM platforms via the "iommu.strict=[0|1]" parameter,
  while retaining the default strict-enabled mode.

  [Test Case]
  $ cat fio.rc
  [global]
  rw=read
  direct=1
  ioengine=libaio
  iodepth=2048
  numjobs=10
  bs=4k
  group_reporting=1
  group_reporting=1
  cpumask=0xff
  runtime=100
  loops = 1

  [job1]
  filename=/dev/nvme0n1

  [Fix]
  44f6876a00e83 iommu/arm-smmu: Support non-strict mode
  b2dfeba654cb0 iommu/io-pgtable-arm-v7s: Add support for non-strict mode
  9662b99a19abc iommu/arm-smmu-v3: Add support for non-strict mode
  b6b65ca20bc93 iommu/io-pgtable-arm: Add support for non-strict mode
  68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  2da274cdf998a iommu/dma: Add support for non-strict mode
  07fdef34d2be6 iommu/arm-smmu-v3: Implement flush_iotlb_all hook
  85c7a0f1ef624 iommu/io-pgtable-arm: Fix race handling in split_blk_unmap()

  [Regression Risk]
  Most of these patches are specific to ARM, and have been regression tested on 
both arm64 (HiSilicon D06) and armhf (QEMU virt) using "stress-ng --vm $(nproc)"

  2 patches do touch arch-indep code however:

  > 68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  Adds a new command line option and sets an attribute that iommu drivers can 
optionally react to. Doesn't change default behavior.

  > 2da274cdf998a iommu/dma: Add support for non-strict mode
  This driver is only built for arm64 and ppc64el (determined by looking at the 
build logs). Most of this patch only changes behavior in the non-default (and 
new) iommu.strict=0 case. The exception, which is called out in the commit 
message, is this hunk:

  -   WARN_ON(iommu_unmap(domain, dma_addr, size) != size);
  +   WARN_ON(iommu_unmap_fast(domain, dma_addr, size) != size);
  +   if (!cookie->fq_domain)
  +   iommu_tlb_sync(domain);

  
  In the default case, where fq_domain will be NULl, we are now factoring 
iommu_unmap() into:
iommu_unmap_fast()
iommu_tlb_sync()

  Looking at the source to iommu_unmap() confirms that this is
  functionally equivalent.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1806488/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp


[Kernel-packages] [Bug 1806488] Re: Support non-strict iommu mode on arm64

2018-12-19 Thread dann frazier
** Changed in: linux (Ubuntu Cosmic)
   Status: New => In Progress

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1806488

Title:
  Support non-strict iommu mode on arm64

Status in linux package in Ubuntu:
  In Progress
Status in linux source package in Bionic:
  New
Status in linux source package in Cosmic:
  In Progress
Status in linux source package in Disco:
  In Progress

Bug description:
  [Impact]
  The Intel IOMMU driver provides an option for strict mode. When disabled, 
batching of IOTLB flush operations is permitted, allowing the user to trade-off 
isolation for improved performance. Ubuntu's kernel currently lacks a parity 
for this feature for ARM.

  There's a significant performance gain to be had by removing the need
  to flush the IOMMU TLB on every unmap on arm64. I'm seeing a 25%
  performance gain w/ fio reads on a single NVMe device.

  This mode of operation is available for x86 via the
  "intel_iommu=strict" parameter. Upstream now exposes an equivalent
  feature for ARM platforms via the "iommu.strict=[0|1]" parameter,
  while retaining the default strict-enabled mode.

  [Test Case]
  $ cat fio.rc
  [global]
  rw=read
  direct=1
  ioengine=libaio
  iodepth=2048
  numjobs=10
  bs=4k
  group_reporting=1
  group_reporting=1
  cpumask=0xff
  runtime=100
  loops = 1

  [job1]
  filename=/dev/nvme0n1

  [Fix]
  44f6876a00e83 iommu/arm-smmu: Support non-strict mode
  b2dfeba654cb0 iommu/io-pgtable-arm-v7s: Add support for non-strict mode
  9662b99a19abc iommu/arm-smmu-v3: Add support for non-strict mode
  b6b65ca20bc93 iommu/io-pgtable-arm: Add support for non-strict mode
  68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  2da274cdf998a iommu/dma: Add support for non-strict mode
  07fdef34d2be6 iommu/arm-smmu-v3: Implement flush_iotlb_all hook
  85c7a0f1ef624 iommu/io-pgtable-arm: Fix race handling in split_blk_unmap()

  [Regression Risk]
  Most of these patches are specific to ARM, and have been regression tested on 
both arm64 (HiSilicon D06) and armhf (QEMU virt) using "stress-ng --vm $(nproc)"

  2 patches do touch arch-indep code however:

  > 68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  Adds a new command line option and sets an attribute that iommu drivers can 
optionally react to. Doesn't change default behavior.

  > 2da274cdf998a iommu/dma: Add support for non-strict mode
  This driver is only built for arm64 and ppc64el (determined by looking at the 
build logs). Most of this patch only changes behavior in the non-default (and 
new) iommu.strict=0 case. The exception, which is called out in the commit 
message, is this hunk:

  -   WARN_ON(iommu_unmap(domain, dma_addr, size) != size);
  +   WARN_ON(iommu_unmap_fast(domain, dma_addr, size) != size);
  +   if (!cookie->fq_domain)
  +   iommu_tlb_sync(domain);

  
  In the default case, where fq_domain will be NULl, we are now factoring 
iommu_unmap() into:
iommu_unmap_fast()
iommu_tlb_sync()

  Looking at the source to iommu_unmap() confirms that this is
  functionally equivalent.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1806488/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp


[Kernel-packages] [Bug 1806488] Re: Support non-strict iommu mode on arm64

2018-12-18 Thread dann frazier
** Description changed:

  [Impact]
- There's a significant performance gain to be had by removing the need to 
flush the IOMMU TLB on every unmap. I'm seeing a 25% performance gain w/ fio 
reads on a single NVMe device. This mode of operation is available for x86 via 
the "intel_iommu=strict" parameter. This support is now available upstream for 
ARM platforms via the "iommu.strict=[0|1]" parameter, while keeping the default 
in strict mode.
+ The Intel IOMMU driver provides an option for strict mode. When disabled, 
batching of IOTLB flush operations is permitted, allowing the user to trade-off 
isolation for improved performance. Ubuntu's kernel currently lacks a parity 
for this feature for ARM.
+ 
+ There's a significant performance gain to be had by removing the need to
+ flush the IOMMU TLB on every unmap on arm64. I'm seeing a 25%
+ performance gain w/ fio reads on a single NVMe device.
+ 
+ This mode of operation is available for x86 via the "intel_iommu=strict"
+ parameter. Upstream now exposes an equivalent feature for ARM platforms
+ via the "iommu.strict=[0|1]" parameter, while retaining the default
+ strict-enabled mode.
  
  [Test Case]
  $ cat fio.rc
  [global]
  rw=read
  direct=1
  ioengine=libaio
  iodepth=2048
  numjobs=10
  bs=4k
  group_reporting=1
  group_reporting=1
  cpumask=0xff
  runtime=100
  loops = 1
  
  [job1]
  filename=/dev/nvme0n1
  
  [Fix]
  44f6876a00e83 iommu/arm-smmu: Support non-strict mode
  b2dfeba654cb0 iommu/io-pgtable-arm-v7s: Add support for non-strict mode
  9662b99a19abc iommu/arm-smmu-v3: Add support for non-strict mode
  b6b65ca20bc93 iommu/io-pgtable-arm: Add support for non-strict mode
  68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  2da274cdf998a iommu/dma: Add support for non-strict mode
  07fdef34d2be6 iommu/arm-smmu-v3: Implement flush_iotlb_all hook
  85c7a0f1ef624 iommu/io-pgtable-arm: Fix race handling in split_blk_unmap()
  
  [Regression Risk]
+ Most of these patches are specific to ARM, and have been regression tested on 
both arm64 (HiSilicon D06) and armhf (QEMU virt) using "stress-ng --vm $(nproc)"
+ 
+ 2 patches do touch arch-indep code however:
+ 
+ > 68a6efe86f6a1 iommu: Add "iommu.strict" command line option
+ Adds a new command line option and sets an attribute that iommu drivers can 
optionally react to. Doesn't change default behavior.
+ 
+ > 2da274cdf998a iommu/dma: Add support for non-strict mode
+ This driver is only built for arm64 and ppc64el (determined by looking at the 
build logs). Most of this patch only changes behavior in the non-default (and 
new) iommu.strict=0 case. The exception, which is called out in the commit 
message, is this hunk:
+ 
+ -   WARN_ON(iommu_unmap(domain, dma_addr, size) != size);
+ +   WARN_ON(iommu_unmap_fast(domain, dma_addr, size) != size);
+ +   if (!cookie->fq_domain)
+ +   iommu_tlb_sync(domain);
+ 
+ 
+ In the default case, where fq_domain will be NULl, we are now factoring 
iommu_unmap() into:
+   iommu_unmap_fast()
+   iommu_tlb_sync()
+ 
+ Looking at the source to iommu_unmap() confirms that this is
+ functionally equivalent.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1806488

Title:
  Support non-strict iommu mode on arm64

Status in linux package in Ubuntu:
  In Progress
Status in linux source package in Bionic:
  New
Status in linux source package in Cosmic:
  New
Status in linux source package in Disco:
  In Progress

Bug description:
  [Impact]
  The Intel IOMMU driver provides an option for strict mode. When disabled, 
batching of IOTLB flush operations is permitted, allowing the user to trade-off 
isolation for improved performance. Ubuntu's kernel currently lacks a parity 
for this feature for ARM.

  There's a significant performance gain to be had by removing the need
  to flush the IOMMU TLB on every unmap on arm64. I'm seeing a 25%
  performance gain w/ fio reads on a single NVMe device.

  This mode of operation is available for x86 via the
  "intel_iommu=strict" parameter. Upstream now exposes an equivalent
  feature for ARM platforms via the "iommu.strict=[0|1]" parameter,
  while retaining the default strict-enabled mode.

  [Test Case]
  $ cat fio.rc
  [global]
  rw=read
  direct=1
  ioengine=libaio
  iodepth=2048
  numjobs=10
  bs=4k
  group_reporting=1
  group_reporting=1
  cpumask=0xff
  runtime=100
  loops = 1

  [job1]
  filename=/dev/nvme0n1

  [Fix]
  44f6876a00e83 iommu/arm-smmu: Support non-strict mode
  b2dfeba654cb0 iommu/io-pgtable-arm-v7s: Add support for non-strict mode
  9662b99a19abc iommu/arm-smmu-v3: Add support for non-strict mode
  b6b65ca20bc93 iommu/io-pgtable-arm: Add support for non-strict mode
  68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  2da274cdf998a iommu/dma: Add support for non-strict mode
  07fdef34d2be6 iommu/arm-smmu-v3: Implement flush_iotlb_all hook
  85c7a0f1ef62

[Kernel-packages] [Bug 1806488] Re: Support non-strict iommu mode on arm64

2018-12-14 Thread dann frazier
** Also affects: linux (Ubuntu Bionic)
   Importance: Undecided
   Status: New

** Also affects: linux (Ubuntu Disco)
   Importance: Undecided
 Assignee: dann frazier (dannf)
   Status: In Progress

** Also affects: linux (Ubuntu Cosmic)
   Importance: Undecided
   Status: New

** Changed in: linux (Ubuntu Cosmic)
 Assignee: (unassigned) => dann frazier (dannf)

** Changed in: linux (Ubuntu Bionic)
 Assignee: (unassigned) => dann frazier (dannf)

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1806488

Title:
  Support non-strict iommu mode on arm64

Status in linux package in Ubuntu:
  In Progress
Status in linux source package in Bionic:
  New
Status in linux source package in Cosmic:
  New
Status in linux source package in Disco:
  In Progress

Bug description:
  [Impact]
  There's a significant performance gain to be had by removing the need to 
flush the IOMMU TLB on every unmap. I'm seeing a 25% performance gain w/ fio 
reads on a single NVMe device. This mode of operation is available for x86 via 
the "intel_iommu=strict" parameter. This support is now available upstream for 
ARM platforms via the "iommu.strict=[0|1]" parameter, while keeping the default 
in strict mode.

  [Test Case]
  $ cat fio.rc
  [global]
  rw=read
  direct=1
  ioengine=libaio
  iodepth=2048
  numjobs=10
  bs=4k
  group_reporting=1
  group_reporting=1
  cpumask=0xff
  runtime=100
  loops = 1

  [job1]
  filename=/dev/nvme0n1

  [Fix]
  44f6876a00e83 iommu/arm-smmu: Support non-strict mode
  b2dfeba654cb0 iommu/io-pgtable-arm-v7s: Add support for non-strict mode
  9662b99a19abc iommu/arm-smmu-v3: Add support for non-strict mode
  b6b65ca20bc93 iommu/io-pgtable-arm: Add support for non-strict mode
  68a6efe86f6a1 iommu: Add "iommu.strict" command line option
  2da274cdf998a iommu/dma: Add support for non-strict mode
  07fdef34d2be6 iommu/arm-smmu-v3: Implement flush_iotlb_all hook
  85c7a0f1ef624 iommu/io-pgtable-arm: Fix race handling in split_blk_unmap()

  [Regression Risk]

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1806488/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp