2023-02-16 09:29:10

by Thorsten Leemhuis

[permalink] [raw]
Subject: [regression] Bug 217037 - cmb attributes missing from the nvme class under sysfs

Hi, this is your Linux kernel regression tracker.

I noticed a regression report in bugzilla.kernel.org. As many (most?)
kernel developer don't keep an eye on it, I decided to forward it by
mail. Quoting from https://bugzilla.kernel.org/show_bug.cgi?id=217037 :

> [email protected] 2023-02-14 14:16:26 UTC
>
> For the CMB-capable nvme ctrls, kernel was exposing couple of related attributes under the sysfs. E.g.
>
>
> # grep . /sys/class/nvme/nvme0/cmb*
> /sys/class/nvme/nvme0/cmb:cmbloc : x00000062
> /sys/class/nvme/nvme0/cmb:cmbsz : x0008021d
> /sys/class/nvme/nvme0/cmbloc:98
> /sys/class/nvme/nvme0/cmbsz:524829
> #
>

> The above was taken from fedora37 running under 6.1.8 kernel build.
> In 6.1.{9,10} all these attributes are gone.
>
> I am running fedora37 under QEMU 7.{0,2}.0, all nvmes are emulated.
>
> I've tried to understand what change in 6.1.9 might have caused it
> (suspected that maybe fedora's src is applying some weird patches on
> top but that's not it), but I could not pinpoint anything specific.
>
> The latest commit that indirectly touches these attributes is
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=86adbf0cdb9ec
> but my C-fu is to weak to understand if this really could somehow
> hide|remove these attrs.
>
> Also from the look of nvme_pci_attrs_are_visible() nothing has
> recently changed. I use same QEMU params for setting up the nvmes
> across all the VMs - is it possible that the way QEMU exposes CMB is
> not valid anymore?
>
> If I check proper BARs with setpci + /proc/iomem it seems like CMB is
> there. SPDK also tells me that given nvme comes with CMB.
>
> Any hints would be appreciated. I have couple of scripts which depend
> on these so I am a bit biased if it comes to prio on this. :)>
> [...]
>
> So I did install the latest available build,
> 6.2.0-0.rc8.20230215gte1c04510.258.vanilla.fc37.x86_64 to be exact,
> but there's no change - /cmb* stuff is still missing (remaining
> parts, lspci output, etc. look exactly the same as in the case of
> previously mentioned versions).

See the ticket for more details.


[TLDR for the rest of this mail: I'm adding this report to the list of
tracked Linux kernel regressions; the text you find below is based on a
few templates paragraphs you might have encountered already in similar
form.]

BTW, let me use this mail to also add the report to the list of tracked
regressions to ensure it's doesn't fall through the cracks:

#regzbot introduced: v6.1..v6.2-rc8
https://bugzilla.kernel.org/show_bug.cgi?id=217037
#regzbot title: nvme: cmb attributes vanished after v6.1.8
#regzbot ignore-activity

This isn't a regression? This issue or a fix for it are already
discussed somewhere else? It was fixed already? You want to clarify when
the regression started to happen? Or point out I got the title or
something else totally wrong? Then just reply and tell me -- ideally
while also telling regzbot about it, as explained by the page listed in
the footer of this mail.

Developers: When fixing the issue, remember to add 'Link:' tags pointing
to the report (e.g. the buzgzilla ticket and maybe this mail as well, if
this thread sees some discussion). See page linked in footer for details.

Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)
--
Everything you wanna know about Linux kernel regression tracking:
https://linux-regtracking.leemhuis.info/about/#tldr
If I did something stupid, please tell me, as explained on that page.


2023-02-16 15:19:27

by Keith Busch

[permalink] [raw]
Subject: Re: [regression] Bug 217037 - cmb attributes missing from the nvme class under sysfs

On Thu, Feb 16, 2023 at 10:28:55AM +0100, Linux regression tracking (Thorsten Leemhuis) wrote:
> Hi, this is your Linux kernel regression tracker.
>
> I noticed a regression report in bugzilla.kernel.org. As many (most?)
> kernel developer don't keep an eye on it, I decided to forward it by
> mail. Quoting from https://bugzilla.kernel.org/show_bug.cgi?id=217037 :
>
> > [email protected] 2023-02-14 14:16:26 UTC
> >
> > For the CMB-capable nvme ctrls, kernel was exposing couple of related attributes under the sysfs. E.g.
> >
> >
> > # grep . /sys/class/nvme/nvme0/cmb*
> > /sys/class/nvme/nvme0/cmb:cmbloc : x00000062
> > /sys/class/nvme/nvme0/cmb:cmbsz : x0008021d
> > /sys/class/nvme/nvme0/cmbloc:98
> > /sys/class/nvme/nvme0/cmbsz:524829

The breakage is that the attributes are decided before we've setup the cmb
regions. I'll send a fix shortly.

2023-02-17 21:24:14

by Jens Axboe

[permalink] [raw]
Subject: Re: [regression] Bug 217037 - cmb attributes missing from the nvme class under sysfs

On Thu, Feb 16, 2023 at 8:19 AM Keith Busch <[email protected]> wrote:
>
> On Thu, Feb 16, 2023 at 10:28:55AM +0100, Linux regression tracking (Thorsten Leemhuis) wrote:
> > Hi, this is your Linux kernel regression tracker.
> >
> > I noticed a regression report in bugzilla.kernel.org. As many (most?)
> > kernel developer don't keep an eye on it, I decided to forward it by
> > mail. Quoting from https://bugzilla.kernel.org/show_bug.cgi?id=217037 :
> >
> > > [email protected] 2023-02-14 14:16:26 UTC
> > >
> > > For the CMB-capable nvme ctrls, kernel was exposing couple of related attributes under the sysfs. E.g.
> > >
> > >
> > > # grep . /sys/class/nvme/nvme0/cmb*
> > > /sys/class/nvme/nvme0/cmb:cmbloc : x00000062
> > > /sys/class/nvme/nvme0/cmb:cmbsz : x0008021d
> > > /sys/class/nvme/nvme0/cmbloc:98
> > > /sys/class/nvme/nvme0/cmbsz:524829
>
> The breakage is that the attributes are decided before we've setup the cmb
> regions. I'll send a fix shortly.

Michael, have you tested this? It's queued up for inclusion, but I don't
see any evidence that this was tested.

--
Jens Axboe


2023-02-19 22:55:53

by Michal Berger

[permalink] [raw]
Subject: Re: [regression] Bug 217037 - cmb attributes missing from the nvme class under sysfs

Have there been any patches submitted for testing? I don't see any as
part of this thread nor at the bugzilla where the issue was initially
reported. :)

Regards,
Michal


pt., 17 lut 2023 o 22:23 Jens Axboe <[email protected]> napisał(a):
>
> On Thu, Feb 16, 2023 at 8:19 AM Keith Busch <[email protected]> wrote:
> >
> > On Thu, Feb 16, 2023 at 10:28:55AM +0100, Linux regression tracking (Thorsten Leemhuis) wrote:
> > > Hi, this is your Linux kernel regression tracker.
> > >
> > > I noticed a regression report in bugzilla.kernel.org. As many (most?)
> > > kernel developer don't keep an eye on it, I decided to forward it by
> > > mail. Quoting from https://bugzilla.kernel.org/show_bug.cgi?id=217037 :
> > >
> > > > [email protected] 2023-02-14 14:16:26 UTC
> > > >
> > > > For the CMB-capable nvme ctrls, kernel was exposing couple of related attributes under the sysfs. E.g.
> > > >
> > > >
> > > > # grep . /sys/class/nvme/nvme0/cmb*
> > > > /sys/class/nvme/nvme0/cmb:cmbloc : x00000062
> > > > /sys/class/nvme/nvme0/cmb:cmbsz : x0008021d
> > > > /sys/class/nvme/nvme0/cmbloc:98
> > > > /sys/class/nvme/nvme0/cmbsz:524829
> >
> > The breakage is that the attributes are decided before we've setup the cmb
> > regions. I'll send a fix shortly.
>
> Michael, have you tested this? It's queued up for inclusion, but I don't
> see any evidence that this was tested.
>
> --
> Jens Axboe
>

2023-02-21 17:03:22

by Keith Busch

[permalink] [raw]
Subject: Re: [regression] Bug 217037 - cmb attributes missing from the nvme class under sysfs

On Sun, Feb 19, 2023 at 11:54:37PM +0100, Michal Berger wrote:
> Have there been any patches submitted for testing? I don't see any as
> part of this thread nor at the bugzilla where the issue was initially
> reported. :)

I'm sorry, I didn't see your email in the bugzilla. With time running out, I
just posted the patch for upstream with a link to your original report, but I
apologize for not getting you CC'ed on it. The fix is included in the 6.2
release.

2023-02-21 18:05:08

by Michal Berger

[permalink] [raw]
Subject: Re: [regression] Bug 217037 - cmb attributes missing from the nvme class under sysfs

Oh, that's quite alright - I asked just to make sure I didn't miss
anything. :) With that said, I just spun up the build (based on
89f5349e) with your commit inside and I can confirm the issue is fixed
on my end (all the attributes are back where they should be).
Appreciate the help!

Regards,
Michal


wt., 21 lut 2023 o 18:02 Keith Busch <[email protected]> napisał(a):
>
> On Sun, Feb 19, 2023 at 11:54:37PM +0100, Michal Berger wrote:
> > Have there been any patches submitted for testing? I don't see any as
> > part of this thread nor at the bugzilla where the issue was initially
> > reported. :)
>
> I'm sorry, I didn't see your email in the bugzilla. With time running out, I
> just posted the patch for upstream with a link to your original report, but I
> apologize for not getting you CC'ed on it. The fix is included in the 6.2
> release.