NVMe max_segments queue parameter gets set to 1

Bug #1588449 reported by bugproxy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Undecided
Tim Gardner
Yakkety
Fix Released
Undecided
Unassigned

Bug Description

== Comment: #0 - Heitor Ricardo Alves de Siqueira - 2016-06-02 10:41:18 ==
There are some upstream patches missing from the 16.04 nvme driver, and this limits adapter performance. We need to include these so that NVMe devices are correctly set up.

I would like to ask Canonical to cherry pick the following patches for the 16.04 kernel:
    * da35825d9a09 ("nvme: set queue limits for the admin queue")
    * 45686b6198bd ("nvme: fix max_segments integer truncation")
    * f21018427cb0 ("block: fix blk_rq_get_max_sectors for driver private requests")

---uname output---
Linux ubuntu 4.4.0-22-generic #40-Ubuntu SMP Thu May 12 22:03:35 UTC 2016 ppc64le ppc64le ppc64le GNU/Linux

---Steps to Reproduce---
Boot the system with an NVMe adapter connected, and verify the queue parameters:

root@ubuntu:~# ./queue.sh nvme0n1
/sys/block/nvme0n1/queue/add_random = 0
/sys/block/nvme0n1/queue/discard_granularity = 4096
/sys/block/nvme0n1/queue/discard_max_bytes = 2199023255040
/sys/block/nvme0n1/queue/discard_max_hw_bytes = 4294966784
/sys/block/nvme0n1/queue/discard_zeroes_data = 0
/sys/block/nvme0n1/queue/hw_sector_size = 4096
/sys/block/nvme0n1/queue/io_poll = 0
/sys/block/nvme0n1/queue/iostats = 1
/sys/block/nvme0n1/queue/logical_block_size = 4096
/sys/block/nvme0n1/queue/max_hw_sectors_kb = 2147483647
/sys/block/nvme0n1/queue/max_integrity_segments = 0
/sys/block/nvme0n1/queue/max_sectors_kb = 1280
/sys/block/nvme0n1/queue/max_segments = 1 <---------------------
/sys/block/nvme0n1/queue/max_segment_size = 65536
/sys/block/nvme0n1/queue/minimum_io_size = 4096
/sys/block/nvme0n1/queue/nomerges = 2
/sys/block/nvme0n1/queue/nr_requests = 1023
/sys/block/nvme0n1/queue/optimal_io_size = 0
/sys/block/nvme0n1/queue/physical_block_size = 4096
/sys/block/nvme0n1/queue/read_ahead_kb = 128
/sys/block/nvme0n1/queue/rotational = 0
/sys/block/nvme0n1/queue/rq_affinity = 1
/sys/block/nvme0n1/queue/scheduler = none
/sys/block/nvme0n1/queue/write_same_max_bytes = 0

We should have max_segments set to 65535 by default.

bugproxy (bugproxy)
tags: added: architecture-ppc64le bugnameltc-142115 severity-high targetmilestone-inin1604
Changed in ubuntu:
assignee: nobody → Taco Screen team (taco-screen-team)
affects: ubuntu → linux (Ubuntu)
Tim Gardner (timg-tpi)
Changed in linux (Ubuntu Yakkety):
assignee: Taco Screen team (taco-screen-team) → nobody
status: New → Fix Released
Changed in linux (Ubuntu Xenial):
assignee: nobody → Tim Gardner (timg-tpi)
status: New → In Progress
Revision history for this message
Tim Gardner (timg-tpi) wrote :
Changed in linux (Ubuntu Xenial):
status: In Progress → Fix Committed
Revision history for this message
Kamal Mostafa (kamalmostafa) wrote :

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

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

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

tags: added: verification-needed-xenial
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2016-06-14 15:19 EDT-------
(In reply to comment #7)
> This bug is awaiting verification that the kernel in -proposed solves the
> problem. Please test the kernel and update this bug with the results. If the
> problem is solved, change the tag 'verification-needed-xenial' to
> 'verification-done-xenial'.
>
> If 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!

Tested on 4.4.0-25-generic, patches seem to be included:

root@everest-lp13:~/halves# ./queue.sh nvme0n1
/sys/block/nvme0n1/queue/add_random = 0
/sys/block/nvme0n1/queue/discard_granularity = 4096
/sys/block/nvme0n1/queue/discard_max_bytes = 2199023255040
/sys/block/nvme0n1/queue/discard_max_hw_bytes = 4294966784
/sys/block/nvme0n1/queue/discard_zeroes_data = 0
/sys/block/nvme0n1/queue/hw_sector_size = 4096
/sys/block/nvme0n1/queue/io_poll = 0
/sys/block/nvme0n1/queue/iostats = 1
/sys/block/nvme0n1/queue/logical_block_size = 4096
/sys/block/nvme0n1/queue/max_hw_sectors_kb = 2147483647
/sys/block/nvme0n1/queue/max_integrity_segments = 0
/sys/block/nvme0n1/queue/max_sectors_kb = 1280
/sys/block/nvme0n1/queue/max_segments = 65535
/sys/block/nvme0n1/queue/max_segment_size = 65536
/sys/block/nvme0n1/queue/minimum_io_size = 4096
/sys/block/nvme0n1/queue/nomerges = 2
/sys/block/nvme0n1/queue/nr_requests = 1023
/sys/block/nvme0n1/queue/optimal_io_size = 0
/sys/block/nvme0n1/queue/physical_block_size = 4096
/sys/block/nvme0n1/queue/read_ahead_kb = 128
/sys/block/nvme0n1/queue/rotational = 0
/sys/block/nvme0n1/queue/rq_affinity = 1
/sys/block/nvme0n1/queue/scheduler = none
/sys/block/nvme0n1/queue/write_same_max_bytes = 0

root@everest-lp13:~/halves# uname -r
4.4.0-25-generic

Moving to verified. Thanks!

tags: added: verification-done-xenial
removed: verification-needed-xenial
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (26.1 KiB)

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

---------------
linux (4.4.0-28.47) xenial; urgency=low

  [ Luis Henriques ]

  * Release Tracking Bug
    - LP: #1595874

  * Linux netfilter local privilege escalation issues (LP: #1595350)
    - netfilter: x_tables: don't move to non-existent next rule
    - netfilter: x_tables: validate targets of jumps
    - netfilter: x_tables: add and use xt_check_entry_offsets
    - netfilter: x_tables: kill check_entry helper
    - netfilter: x_tables: assert minimum target size
    - netfilter: x_tables: add compat version of xt_check_entry_offsets
    - netfilter: x_tables: check standard target size too
    - netfilter: x_tables: check for bogus target offset
    - netfilter: x_tables: validate all offsets and sizes in a rule
    - netfilter: x_tables: don't reject valid target size on some architectures
    - netfilter: arp_tables: simplify translate_compat_table args
    - netfilter: ip_tables: simplify translate_compat_table args
    - netfilter: ip6_tables: simplify translate_compat_table args
    - netfilter: x_tables: xt_compat_match_from_user doesn't need a retval
    - netfilter: x_tables: do compat validation via translate_table
    - netfilter: x_tables: introduce and use xt_copy_counters_from_user

  * Linux netfilter IPT_SO_SET_REPLACE memory corruption (LP: #1555338)
    - netfilter: x_tables: validate e->target_offset early
    - netfilter: x_tables: make sure e->next_offset covers remaining blob size
    - netfilter: x_tables: fix unconditional helper

linux (4.4.0-27.46) xenial; urgency=low

  [ Kamal Mostafa ]

  * Release Tracking Bug
    - LP: #1594906

  * Support Edge Gateway's Bluetooth LED (LP: #1512999)
    - Revert "UBUNTU: SAUCE: Bluetooth: Support for LED on Marvell modules"

linux (4.4.0-26.45) xenial; urgency=low

  [ Kamal Mostafa ]

  * Release Tracking Bug
    - LP: #1594442

  * linux: Implement secure boot state variables (LP: #1593075)
    - SAUCE: UEFI: Add secure boot and MOK SB State disabled sysctl

  * failures building userspace packages that include ethtool.h (LP: #1592930)
    - ethtool.h: define INT_MAX for userland

linux (4.4.0-25.44) xenial; urgency=low

  [ Kamal Mostafa ]

  * Release Tracking Bug
    - LP: #1591289

  * Xenial update to v4.4.13 stable release (LP: #1590455)
    - MIPS64: R6: R2 emulation bugfix
    - MIPS: math-emu: Fix jalr emulation when rd == $0
    - MIPS: MSA: Fix a link error on `_init_msa_upper' with older GCC
    - MIPS: Don't unwind to user mode with EVA
    - MIPS: Avoid using unwind_stack() with usermode
    - MIPS: Fix siginfo.h to use strict posix types
    - MIPS: Fix uapi include in exported asm/siginfo.h
    - MIPS: Fix watchpoint restoration
    - MIPS: Flush highmem pages in __flush_dcache_page
    - MIPS: Handle highmem pages in __update_cache
    - MIPS: Sync icache & dcache in set_pte_at
    - MIPS: ath79: make bootconsole wait for both THRE and TEMT
    - MIPS: Reserve nosave data for hibernation
    - MIPS: Loongson-3: Reserve 32MB for RS780E integrated GPU
    - MIPS: Use copy_s.fmt rather than copy_u.fmt
    - MIPS: Fix MSA ld_*/st_* asm macros to use PTR_ADDU
    - MIPS: Prevent "restoration" of MSA c...

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

Other bug subscribers

Remote bug watches

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