Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 May 2022 20:37:41 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Tomoaki AOKI <junchoon@dec.sakura.ne.jp>
Cc:        FreeBSD Current <freebsd-current@freebsd.org>, Warner Losh <imp@freebsd.org>
Subject:   Re: Massive "Found bio_cmd = 0x5" with options CAM_IOSCHED_DYNAMIC
Message-ID:  <CANCZdfrahNQVaJA6kaTFxEDNUXHzNFSU=7vcHQziOuOBG8eong@mail.gmail.com>
In-Reply-To: <20220505090316.1df9a1bc2e07e69b1da8cb64@dec.sakura.ne.jp>
References:  <20220505090316.1df9a1bc2e07e69b1da8cb64@dec.sakura.ne.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
--00000000000026c19a05de3aa0bc
Content-Type: text/plain; charset="UTF-8"

On Wed, May 4, 2022 at 6:03 PM Tomoaki AOKI <junchoon@dec.sakura.ne.jp>
wrote:

> Hi.
>
> After updating src main git: f44280bf5fbb to git: 1599fc904d35,
> with options CAM_IOSCHED_DYNAMIC on kernel config file,
> A plenty of "Found bio_cmd = 0x5" appear on console and dmesg.
>
> With quick look under src/sys/, bio_cmd = 0x5 means BIO_FLUSH,
> and the printf() only appears on src/sys/cam/cam_iosched.c line 1621.[1]
>
> Maybe it actually wouldn't be harmful (just annoying), but possibly
> any conditions blocking BIO_FLUSH to reach there would be lost.
> (The printf() itself was already there at git: f44280bf5fbb.)
>
> If it's actualy not at all harmful, and BIO_FLUSH case is coming
> through here is intentional change, is it really needed to be printed?
>

It's a useless printf. I've removed it and posted an analysis in the commit
message. Basically, read_bias == 0 will queue other operations to bio_queue
now, so the printf is a false positive to find transactions that shouldn't
be
on the queue.

If you set read_bias = 1, then the messages will go away until you can
recompile.

I also don't need to know the storage, since this is independent of the
periphs...

Warner


> There were 4 commits to cam_iosched.c within the span.
>
>   cc1572ddeb8cd82879ce0cca634bf6a8830c0f40    [2]
>     cam iosched: Remove write bias when read bias = 0
>   b65803ba5773d5fb37fa2403105db199569a5811    [3]
>     cam iosched: default to no read bias in dynamic ioscheduling
>   d592c0db8ba773c143eeea28610288f800fa651a    [4]
>     cam: add hw.cam.iosched.read_bias
>   1599fc904d35cfa8eecad92818d1f4b55de6818f    [5]
>     iosched: Move bio_next() inside of the CAM_IOSCHED_DYNAMIC ifdef
>
>
> [1] https://cgit.freebsd.org/src/tree/sys/cam/cam_iosched.c#n1621
>
> [2]
>
> https://cgit.freebsd.org/src/commit/?id=cc1572ddeb8cd82879ce0cca634bf6a8830c0f40
>
> [3]
>
> https://cgit.freebsd.org/src/commit/?id=b65803ba5773d5fb37fa2403105db199569a5811
>
> [4]
>
> https://cgit.freebsd.org/src/commit/?id=d592c0db8ba773c143eeea28610288f800fa651a
>
> [5]
>
> https://cgit.freebsd.org/src/commit/?id=1599fc904d35cfa8eecad92818d1f4b55de6818f
>
>
> Regards.
>
> --
> Tomoaki AOKI    <junchoon@dec.sakura.ne.jp>
>

--00000000000026c19a05de3aa0bc
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">On Wed, May 4, 2022 at 6:03 PM Tomoak=
i AOKI &lt;<a href=3D"mailto:junchoon@dec.sakura.ne.jp">junchoon@dec.sakura=
.ne.jp</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"m=
argin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left=
:1ex">Hi.<br>
<br>
After updating src main git: f44280bf5fbb to git: 1599fc904d35,<br>
with options CAM_IOSCHED_DYNAMIC on kernel config file,<br>
A plenty of &quot;Found bio_cmd =3D 0x5&quot; appear on console and dmesg.<=
br>
<br>
With quick look under src/sys/, bio_cmd =3D 0x5 means BIO_FLUSH,<br>
and the printf() only appears on src/sys/cam/cam_iosched.c line 1621.[1]<br=
>
<br>
Maybe it actually wouldn&#39;t be harmful (just annoying), but possibly<br>
any conditions blocking BIO_FLUSH to reach there would be lost.<br>
(The printf() itself was already there at git: f44280bf5fbb.)<br>
<br>
If it&#39;s actualy not at all harmful, and BIO_FLUSH case is coming<br>
through here is intentional change, is it really needed to be printed?<br><=
/blockquote><div><br></div><div>It&#39;s a useless printf. I&#39;ve removed=
 it and posted an analysis in the commit</div><div>message. Basically, read=
_bias =3D=3D 0 will queue other operations to bio_queue</div><div>now, so t=
he printf is a false positive to find transactions that shouldn&#39;t be</d=
iv><div>on the queue.</div><div><br></div><div>If you set read_bias =3D 1, =
then the messages will go away until you can</div><div>recompile.</div><div=
><br></div><div>I also don&#39;t need to know the storage, since this is in=
dependent of the</div><div>periphs...<br></div><div><br></div><div>Warner<b=
r></div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:=
0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
There were 4 commits to cam_iosched.c within the span.<br>
<br>
=C2=A0 cc1572ddeb8cd82879ce0cca634bf6a8830c0f40=C2=A0 =C2=A0 [2]<br>
=C2=A0 =C2=A0 cam iosched: Remove write bias when read bias =3D 0<br>
=C2=A0 b65803ba5773d5fb37fa2403105db199569a5811=C2=A0 =C2=A0 [3]<br>
=C2=A0 =C2=A0 cam iosched: default to no read bias in dynamic ioscheduling<=
br>
=C2=A0 d592c0db8ba773c143eeea28610288f800fa651a=C2=A0 =C2=A0 [4]<br>
=C2=A0 =C2=A0 cam: add hw.cam.iosched.read_bias<br>
=C2=A0 1599fc904d35cfa8eecad92818d1f4b55de6818f=C2=A0 =C2=A0 [5]<br>
=C2=A0 =C2=A0 iosched: Move bio_next() inside of the CAM_IOSCHED_DYNAMIC if=
def<br>
<br>
<br>
[1] <a href=3D"https://cgit.freebsd.org/src/tree/sys/cam/cam_iosched.c#n162=
1" rel=3D"noreferrer" target=3D"_blank">https://cgit.freebsd.org/src/tree/s=
ys/cam/cam_iosched.c#n1621</a><br>
<br>
[2]<br>
<a href=3D"https://cgit.freebsd.org/src/commit/?id=3Dcc1572ddeb8cd82879ce0c=
ca634bf6a8830c0f40" rel=3D"noreferrer" target=3D"_blank">https://cgit.freeb=
sd.org/src/commit/?id=3Dcc1572ddeb8cd82879ce0cca634bf6a8830c0f40</a><br>
<br>
[3]<br>
<a href=3D"https://cgit.freebsd.org/src/commit/?id=3Db65803ba5773d5fb37fa24=
03105db199569a5811" rel=3D"noreferrer" target=3D"_blank">https://cgit.freeb=
sd.org/src/commit/?id=3Db65803ba5773d5fb37fa2403105db199569a5811</a><br>
<br>
[4]<br>
<a href=3D"https://cgit.freebsd.org/src/commit/?id=3Dd592c0db8ba773c143eeea=
28610288f800fa651a" rel=3D"noreferrer" target=3D"_blank">https://cgit.freeb=
sd.org/src/commit/?id=3Dd592c0db8ba773c143eeea28610288f800fa651a</a><br>
<br>
[5]<br>
<a href=3D"https://cgit.freebsd.org/src/commit/?id=3D1599fc904d35cfa8eecad9=
2818d1f4b55de6818f" rel=3D"noreferrer" target=3D"_blank">https://cgit.freeb=
sd.org/src/commit/?id=3D1599fc904d35cfa8eecad92818d1f4b55de6818f</a><br>
<br>
<br>
Regards.<br>
<br>
-- <br>
Tomoaki AOKI=C2=A0 =C2=A0 &lt;<a href=3D"mailto:junchoon@dec.sakura.ne.jp" =
target=3D"_blank">junchoon@dec.sakura.ne.jp</a>&gt;<br>
</blockquote></div></div>

--00000000000026c19a05de3aa0bc--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfrahNQVaJA6kaTFxEDNUXHzNFSU=7vcHQziOuOBG8eong>