Skip to content

blk-wbt: use fast inverse square root to optimize window size calculation#73

Closed
blktests-ci[bot] wants to merge 3 commits intofor-next_basefrom
series/986195=>for-next
Closed

blk-wbt: use fast inverse square root to optimize window size calculation#73
blktests-ci[bot] wants to merge 3 commits intofor-next_basefrom
series/986195=>for-next

Conversation

@blktests-ci
Copy link
Copy Markdown

@blktests-ci blktests-ci Bot commented Jul 31, 2025

Pull request for series with
subject: blk-wbt: use fast inverse square root to optimize window size calculation
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=986195

axboe and others added 3 commits July 30, 2025 08:23
* block-6.17:
  block: fix potential deadlock while running nr_hw_queue update
  block: fix lockdep warning caused by lock dependency in elv_iosched_store
  block: move elevator queue allocation logic into blk_mq_init_sched
  blk-ioc: don't hold queue_lock for ioc_lookup_icq()
  block: Enforce power-of-2 physical block size
  block: avoid possible overflow for chunk_sectors check in blk_stack_limits()
  block: Improve read ahead size for rotational devices
* io_uring-6.17:
  io_uring/net: Allow to do vectorized send
@blktests-ci
Copy link
Copy Markdown
Author

blktests-ci Bot commented Jul 31, 2025

Upstream branch: 4643847
series: https://patchwork.kernel.org/project/linux-block/list/?series=986195
version: 1

Pull request is NOT updated. Failed to apply https://patchwork.kernel.org/project/linux-block/list/?series=986195
error message:

Cmd('git') failed due to: exit code(128)
  cmdline: git am --3way
  stdout: 'Applying: blk-wbt: use fast inverse square root to optimize window size calculation
Patch failed at 0001 blk-wbt: use fast inverse square root to optimize window size calculation'
  stderr: 'error: patch fragment without header at line 21: @@ -395,20 +402,55 @@ static void scale_down(struct rq_wb *rwb, bool hard_throttle)
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"'

conflict:


@blktests-ci blktests-ci Bot force-pushed the for-next_base branch 6 times, most recently from 26415c4 to 3ffa704 Compare August 3, 2025 12:52
@blktests-ci blktests-ci Bot force-pushed the for-next_base branch 6 times, most recently from 651764c to e438678 Compare August 13, 2025 12:53
@kawasaki kawasaki closed this Aug 23, 2025
@blktests-ci blktests-ci Bot deleted the series/986195=>for-next branch August 31, 2025 02:47
blktests-ci Bot pushed a commit that referenced this pull request Jan 27, 2026
Revert commit bfc467d ("serial: remove redundant
tty_port_link_device()") because the tty_port_link_device() is not
redundant: the tty->port has to be confured before we call
uart_configure_port(), otherwise user-space can open console without TTY
linked to the driver.

This tty_port_link_device() was added explicitly to avoid this exact
issue in commit fb2b900 ("tty: link tty and port before configuring
it as console"), so offending commit basically reverted the fix saying
it is redundant without addressing the actual race condition presented
there.

Reproducible always as tty->port warning on Qualcomm SoC with most of
devices disabled, so with very fast boot, and one serial device being
the console:

  printk: legacy console [ttyMSM0] enabled
  printk: legacy console [ttyMSM0] enabled
  printk: legacy bootconsole [qcom_geni0] disabled
  printk: legacy bootconsole [qcom_geni0] disabled
  ------------[ cut here ]------------
  tty_init_dev: ttyMSM driver does not set tty->port. This would crash the kernel. Fix the driver!
  WARNING: drivers/tty/tty_io.c:1414 at tty_init_dev.part.0+0x228/0x25c, CPU#2: systemd/1
  Modules linked in: socinfo tcsrcc_eliza gcc_eliza sm3_ce fuse ipv6
  CPU: 2 UID: 0 PID: 1 Comm: systemd Tainted: G S                  6.19.0-rc4-next-20260108-00024-g2202f4d30aa8 #73 PREEMPT
  Tainted: [S]=CPU_OUT_OF_SPEC
  Hardware name: Qualcomm Technologies, Inc. Eliza (DT)
  ...
  tty_init_dev.part.0 (drivers/tty/tty_io.c:1414 (discriminator 11)) (P)
  tty_open (arch/arm64/include/asm/atomic_ll_sc.h:95 (discriminator 3) drivers/tty/tty_io.c:2073 (discriminator 3) drivers/tty/tty_io.c:2120 (discriminator 3))
  chrdev_open (fs/char_dev.c:411)
  do_dentry_open (fs/open.c:962)
  vfs_open (fs/open.c:1094)
  do_open (fs/namei.c:4634)
  path_openat (fs/namei.c:4793)
  do_filp_open (fs/namei.c:4820)
  do_sys_openat2 (fs/open.c:1391 (discriminator 3))
  ...
  Starting Network Name Resolution...

Apparently the flow with this small Yocto-based ramdisk user-space is:

driver (qcom_geni_serial.c):                  user-space:
============================                  ===========
qcom_geni_serial_probe()
 uart_add_one_port()
  serial_core_register_port()
   serial_core_add_one_port()
    uart_configure_port()
     register_console()
    |
    |                                         open console
    |                                          ...
    |                                          tty_init_dev()
    |                                           driver->ports[idx] is NULL
    |
    tty_port_register_device_attr_serdev()
     tty_port_link_device() <- set driver->ports[idx]

Fixes: bfc467d ("serial: remove redundant tty_port_link_device()")
Cc: [email protected]
Signed-off-by: Krzysztof Kozlowski <[email protected]>
Reviewed-by: Jiri Slaby <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants