From nobody Thu May 05 02:37:41 2022 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8A3E81ABDAA5 for ; Thu, 5 May 2022 02:37:41 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-vs1-xe34.google.com (mail-vs1-xe34.google.com [IPv6:2607:f8b0:4864:20::e34]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KtyXh3lqQz3sXx for ; Thu, 5 May 2022 02:37:40 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-vs1-xe34.google.com with SMTP id c62so2972467vsc.10 for ; Wed, 04 May 2022 19:37:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/rL+6ijrsaZPidumVIApRYqb1D/TBR0HwJCe9dZgc0Y=; b=piFF7g7w95bqPG1QyPOpkEndvL5TmUtnlpWb8DHjb9bADr2JELJ6oj/4VOBOs+L7Uf oiNfQGPqEZwFYRukz4pCNOLdDaJ/K8p507JTVtBYhXjveoo+BIcPL5gAOX1qwuVUG/cm 9pTolJiHJAWl14V018Ws9U0fKyOfH/RzYcvlCcYsEHgQWAiU3H5kT1i8YrU0VoJemqs4 Ve1Ae/T9m7HzU2PF6tGArCsChokOXx0XZy12qxvXSh4fQOWSa/ecaToYmY1B5igt/95j HBspi8QcqRHlegMAlS2fvPMN1tPJypDoQviuGu+PmOkmRlnknQ+0AfVpSC25cinn7Fdt UGog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/rL+6ijrsaZPidumVIApRYqb1D/TBR0HwJCe9dZgc0Y=; b=iDF//SP57TUm2Sb99FdC8+m0ysdPiBObqswdXbemwi+guToucAWWcnKKmO0gIkXiT0 VoK5EmCekU6Iembr4qrij4c97Sy0eFe27AXa4YpzexEaOSmAgvObVzmQzVWNQxULo2+q pLZ8pdgimbrEHnntey9VwlBXETvjGbidGyqP9oYKfpJaf1EgW2qJ5FI/V9DeXQmjbrcD gFufgfjHPwyqgZ72e4uJfhhCHO3KpF0aUElFzTXIfRjW/306t4ARDybDNJJde590YWLA xV9bQtAjzZUb19WK/y4BT3aAqeZ220xidpD5MTbxDgqUnjVnPz64al/6cu6fS2/9z/dd hApQ== X-Gm-Message-State: AOAM532iHo3uzlonGhGrEkN+KNflyYFJh3zG6wj6v+db027Qof6wM7Lr Kl/oBpcvywGD0n4mXzQqntY123vzLyAdvCYsxioHtQ== X-Google-Smtp-Source: ABdhPJyknRSG8IOO9O4eP3+dumm6CO2yR1sqg3FEz/GGs95Q+i8QNioRwyz4QzGAyzkhASF0aKkUcCBm7jLiYBd2IO0= X-Received: by 2002:a67:f445:0:b0:32c:c32c:c7c1 with SMTP id r5-20020a67f445000000b0032cc32cc7c1mr7621489vsn.51.1651718259911; Wed, 04 May 2022 19:37:39 -0700 (PDT) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 References: <20220505090316.1df9a1bc2e07e69b1da8cb64@dec.sakura.ne.jp> In-Reply-To: <20220505090316.1df9a1bc2e07e69b1da8cb64@dec.sakura.ne.jp> From: Warner Losh Date: Wed, 4 May 2022 20:37:41 -0600 Message-ID: Subject: Re: Massive "Found bio_cmd = 0x5" with options CAM_IOSCHED_DYNAMIC To: Tomoaki AOKI Cc: FreeBSD Current , Warner Losh Content-Type: multipart/alternative; boundary="00000000000026c19a05de3aa0bc" X-Rspamd-Queue-Id: 4KtyXh3lqQz3sXx X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20210112.gappssmtp.com header.s=20210112 header.b=piFF7g7w; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::e34) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.93 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20210112.gappssmtp.com:s=20210112]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20210112.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.93)[-0.934]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::e34:from]; MLMMJ_DEST(0.00)[freebsd-current]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_SPF_NA(0.00)[no SPF record]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N --00000000000026c19a05de3aa0bc Content-Type: text/plain; charset="UTF-8" On Wed, May 4, 2022 at 6:03 PM Tomoaki AOKI 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 > --00000000000026c19a05de3aa0bc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Wed, May 4, 2022 at 6:03 PM Tomoak= i 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 =3D 0x5" appear on console and dmesg.<= br>
With quick look under src/sys/, bio_cmd =3D 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?
<= /blockquote>

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

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

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

Warner
=C2=A0
There were 4 commits to cam_iosched.c within the span.

=C2=A0 cc1572ddeb8cd82879ce0cca634bf6a8830c0f40=C2=A0 =C2=A0 [2]
=C2=A0 =C2=A0 cam iosched: Remove write bias when read bias =3D 0
=C2=A0 b65803ba5773d5fb37fa2403105db199569a5811=C2=A0 =C2=A0 [3]
=C2=A0 =C2=A0 cam iosched: default to no read bias in dynamic ioscheduling<= br> =C2=A0 d592c0db8ba773c143eeea28610288f800fa651a=C2=A0 =C2=A0 [4]
=C2=A0 =C2=A0 cam: add hw.cam.iosched.read_bias
=C2=A0 1599fc904d35cfa8eecad92818d1f4b55de6818f=C2=A0 =C2=A0 [5]
=C2=A0 =C2=A0 iosched: Move bio_next() inside of the CAM_IOSCHED_DYNAMIC if= def


[1] https://cgit.freebsd.org/src/tree/s= ys/cam/cam_iosched.c#n1621

[2]
https://cgit.freeb= sd.org/src/commit/?id=3Dcc1572ddeb8cd82879ce0cca634bf6a8830c0f40

[3]
https://cgit.freeb= sd.org/src/commit/?id=3Db65803ba5773d5fb37fa2403105db199569a5811

[4]
https://cgit.freeb= sd.org/src/commit/?id=3Dd592c0db8ba773c143eeea28610288f800fa651a

[5]
https://cgit.freeb= sd.org/src/commit/?id=3D1599fc904d35cfa8eecad92818d1f4b55de6818f


Regards.

--
Tomoaki AOKI=C2=A0 =C2=A0 <junchoon@dec.sakura.ne.jp>
--00000000000026c19a05de3aa0bc--