Linux bluetooth development
 help / color / mirror / Atom feed
From: Sergey Lebedev <lsa.uz@pm.me>
To: "Vladimir V . Kondratyev" <vladimirkondratyev2@gmail.com>
Cc: Marcel Holtmann <marcel@holtmann.org>,
	Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	Paul Menzel <pmenzel@molgen.mpg.de>,
	Chandrashekar Devegowda <chandrashekar.devegowda@intel.com>,
	Kiran K <kiran.k@intel.com>, Arnd Bergmann <arnd@arndb.de>,
	linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] Bluetooth: btintel_pcie: fix stale cache in set_dxstate fallback check
Date: Thu, 03 Sep 2026 19:53:48 +0000	[thread overview]
Message-ID: <20260903195342.78248-1-lsa.uz@pm.me> (raw)
In-Reply-To: <20260903192245.135310-2-vladimirkondratyev2@gmail.com>

Vladimir, Paul, Chandrashekar, Kiran,

Nothing here asks for a change to v4 — it is right and my Tested-by stands. This
is the measurement behind a question I put to the list on 2026-09-02 and could
not support with numbers at the time.

The question was whether BTINTEL_PCIE_CSR_BOOT_STAGE_REG should be polled for the
target D-state, with the alive interrupt demoted to an early exit, rather than the
other way round. So I timed both against the same zero — the write in
btintel_pcie_wr_sleep_cntrl() — on Surface Pro 11 (Lunar Lake), Intel BE201,
8086:a876 rev 10, kernel 7.0.0-30, s2idle. A measurement build polls the register
every 100 us and records when bit 24 reaches the target and when gp0_received
becomes true. Four suspend/resume cycles, eight transitions:

  dxstate  register (us)              interrupt (us)
  D3       1517  1027  1085  1111     1670  1171  1085  1112
  D0       1630  1521  1676  1701     1630  1646  1676  1701

The register reaches the target state in **1.0 to 1.7 ms** and is **never later
than the interrupt**. In four of the eight it is the same 100 us sample; in two
it leads by 125 and 153 us. Against that, the current path budgets 200 ms per
attempt and three attempts — up to 600 ms per transition, twice per suspend cycle.

That is the whole of my case, and its limits are worth stating plainly. One
machine, one controller, one firmware. The poll itself is PCIe traffic and could
be perturbing what it measures, though it would have to be perturbing it in the
direction that flatters the register. And a settle time is not a guarantee: an
interrupt exists partly so the driver need not assume a bound.

But if the bound holds on Intel's own hardware, polling would delete the
stale-cache class of bug rather than catch it, and POLL_INTERVAL_US is already
declared in btintel_pcie.h and unused.

I have not written that patch, because it is your subsystem and my coverage is
one machine. What I do have is the hardware, a fixture that drops the alive
interrupt on demand, and the per-hunk method already used in this thread. So if
an RFC would be useful rather than noise, I will write one and report it the same
way — measured per hunk, with the failure injected and with it disabled. If you
would rather it came from someone with the full range of controllers, that is a
perfectly good answer and I will leave it here.

Sergey


  reply	other threads:[~2026-09-03 19:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-07 20:34 [PATCH] Bluetooth: btintel_pcie: fix stale cache in set_dxstate fallback check Vladimir V. Kondratyev
2026-05-07 21:06 ` bluez.test.bot
2026-09-01 20:37 ` [PATCH] " Vladimir V. Kondratyev
2026-09-01 22:36   ` bluez.test.bot
2026-09-02  5:35   ` [PATCH] " Paul Menzel
2026-09-02  7:24     ` Sergey Lebedev
2026-09-02  8:38       ` Paul Menzel
2026-09-02  9:30     ` Sergey Lebedev
2026-09-03 14:29 ` [PATCH v3] " Vladimir V. Kondratyev
2026-09-03 14:36   ` Paul Menzel
2026-09-03 14:47   ` [v3] " bluez.test.bot
2026-09-03 15:35 ` [PATCH v3] " Vladimir V. Kondratyev
2026-09-03 17:20   ` Sergey Lebedev
2026-09-03 18:40   ` [v3] " bluez.test.bot
2026-09-03 20:19     ` Paul Menzel
2026-09-03 19:22 ` [PATCH v4] " Vladimir V. Kondratyev
2026-09-03 19:53   ` Sergey Lebedev [this message]
2026-09-03 21:25   ` [v4] " bluez.test.bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260903195342.78248-1-lsa.uz@pm.me \
    --to=lsa.uz@pm.me \
    --cc=arnd@arndb.de \
    --cc=chandrashekar.devegowda@intel.com \
    --cc=kiran.k@intel.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=pmenzel@molgen.mpg.de \
    --cc=vladimirkondratyev2@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox