Date: Wed, 1 Nov 2023 09:01:32 +0800 From: Zhenlei Huang <zlei@FreeBSD.org> To: Rick Macklem <rick.macklem@gmail.com> Cc: John Baldwin <jhb@freebsd.org>, Gordon Bergling <gbe@freebsd.org>, FreeBSD Current <current@freebsd.org>, gallatin@freebsd.org Subject: Re: KTLS thread on 14.0-RC3 Message-ID: <EF0D2F9C-805A-4185-9B61-D640776E64B0@FreeBSD.org> In-Reply-To: <CAM5tNy7pdh0R=G4MGvEkOp9xmh_N7coHtRMMt1VZ5rSEWog9KA@mail.gmail.com> References: <ZT4pKpw35P-J-Q_T@bastion.ttyv0.de> <F6D87896-038C-4152-AFBD-68B0DDC71801@FreeBSD.org> <53AC8651-141E-4950-84D9-FD94E8B353FD@FreeBSD.org> <77952261-2fe0-428e-b72c-d805f0273a76@FreeBSD.org> <CAM5tNy7pdh0R=G4MGvEkOp9xmh_N7coHtRMMt1VZ5rSEWog9KA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail=_E2A72CED-7518-44EF-9F30-A7D526AA07AC Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Nov 1, 2023, at 8:37 AM, Rick Macklem <rick.macklem@gmail.com> = wrote: >=20 > On Tue, Oct 31, 2023 at 10:06=E2=80=AFAM John Baldwin <jhb@freebsd.org = <mailto:jhb@freebsd.org>> wrote: >>=20 >> On 10/30/23 3:41 AM, Zhenlei Huang wrote: >>>=20 >>>=20 >>>> On Oct 30, 2023, at 12:09 PM, Zhenlei Huang <zlei@FreeBSD.org> = wrote: >>>>=20 >>>>=20 >>>>=20 >>>>> On Oct 29, 2023, at 5:43 PM, Gordon Bergling <gbe@freebsd.org> = wrote: >>>>>=20 >>>>> Hi, >>>>>=20 >>>>> I am currently building a new system, which should be based on = 14.0-RELEASE. >>>>> Therefor I am tracking releng/14.0 since its creation and updating = it currently >>>>> via the usualy buildworld steps. >>>>>=20 >>>>> What I have noticed recently is, that the [KTLS] is missing. I = have a stable/13 >>>>> system which shows the [KTLS] thread and a very recent -CURRENT = that also shows >>>>> the [KTLS] thread. >>>>>=20 >>>>> The stable/13 and releng/14.0 systems both use the GENERIC kernel, = without any >>>>> custom modifications. >>>>>=20 >>>>> Loaded KLDs are also the same. >>>>>=20 >>>>> Did I miss something, or is there something in releng/14.0 = missing, which >>>>> is currenlty enabled in stable/13? >>>>=20 >>>> KTLS shall still work as intended, the creation of it threads is = deferred. >>>>=20 >>>> See a72ee355646c (ktls: Defer creation of threads and zones until = first use) >>>>> Run ktls_init() when the first KTLS session is created rather than >>>>> unconditionally during boot. This avoids creating unused threads = and >>>>> allocating unused resources on systems which do not use KTLS. >>>>=20 >>>> ``` >>>> -SYSINIT(ktls, SI_SUB_SMP + 1, SI_ORDER_ANY, ktls_init, NULL); >>>> ``` >>>=20 >>> Seems 14.0 only create one KTLS thread. >>>=20 >>> IIRC 13.2 create one thread per core. >>=20 >> That part should not be different. There should always be one thread = per core. > Just fyi, I see one thread/core. > Did you happen to do something like "ps ax" instead of "ps axHl"? Yes, I typed "ps auxx". `ps axHl` is the right way to get kernel = threads. Sorry for the noise. >=20 > rick > ps: I also see a reclaim_0 thread. >=20 >>=20 >> -- >> John Baldwin --Apple-Mail=_E2A72CED-7518-44EF-9F30-A7D526AA07AC Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; = charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; line-break: after-white-space;" class=3D""><br = class=3D""><div><br class=3D""><blockquote type=3D"cite" class=3D""><div = class=3D"">On Nov 1, 2023, at 8:37 AM, Rick Macklem <<a = href=3D"mailto:rick.macklem@gmail.com" = class=3D"">rick.macklem@gmail.com</a>> wrote:</div><br = class=3D"Apple-interchange-newline"><div class=3D""><meta = charset=3D"UTF-8" class=3D""><span style=3D"caret-color: rgb(0, 0, 0); = font-family: Menlo-Regular; font-size: 13px; font-style: normal; = font-variant-caps: normal; font-weight: 400; letter-spacing: normal; = text-align: start; text-indent: 0px; text-transform: none; white-space: = normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; = text-decoration: none; float: none; display: inline !important;" = class=3D"">On Tue, Oct 31, 2023 at 10:06=E2=80=AFAM John Baldwin = <</span><a href=3D"mailto:jhb@freebsd.org" style=3D"font-family: = Menlo-Regular; font-size: 13px; font-style: normal; font-variant-caps: = normal; font-weight: 400; letter-spacing: normal; orphans: auto; = text-align: start; text-indent: 0px; text-transform: none; white-space: = normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; = -webkit-text-stroke-width: 0px;" class=3D"">jhb@freebsd.org</a><span = style=3D"caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; = font-size: 13px; font-style: normal; font-variant-caps: normal; = font-weight: 400; letter-spacing: normal; text-align: start; = text-indent: 0px; text-transform: none; white-space: normal; = word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: = none; float: none; display: inline !important;" class=3D"">> = wrote:</span><br style=3D"caret-color: rgb(0, 0, 0); font-family: = Menlo-Regular; font-size: 13px; font-style: normal; font-variant-caps: = normal; font-weight: 400; letter-spacing: normal; text-align: start; = text-indent: 0px; text-transform: none; white-space: normal; = word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: = none;" class=3D""><blockquote type=3D"cite" style=3D"font-family: = Menlo-Regular; font-size: 13px; font-style: normal; font-variant-caps: = normal; font-weight: 400; letter-spacing: normal; orphans: auto; = text-align: start; text-indent: 0px; text-transform: none; white-space: = normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; = -webkit-text-stroke-width: 0px; text-decoration: none;" class=3D""><br = class=3D"">On 10/30/23 3:41 AM, Zhenlei Huang wrote:<br = class=3D""><blockquote type=3D"cite" class=3D""><br class=3D""><br = class=3D""><blockquote type=3D"cite" class=3D"">On Oct 30, 2023, at = 12:09 PM, Zhenlei Huang <<a href=3D"mailto:zlei@FreeBSD.org" = class=3D"">zlei@FreeBSD.org</a>> wrote:<br class=3D""><br = class=3D""><br class=3D""><br class=3D""><blockquote type=3D"cite" = class=3D"">On Oct 29, 2023, at 5:43 PM, Gordon Bergling <<a = href=3D"mailto:gbe@freebsd.org" class=3D"">gbe@freebsd.org</a>> = wrote:<br class=3D""><br class=3D"">Hi,<br class=3D""><br class=3D"">I = am currently building a new system, which should be based on = 14.0-RELEASE.<br class=3D"">Therefor I am tracking releng/14.0 since its = creation and updating it currently<br class=3D"">via the usualy = buildworld steps.<br class=3D""><br class=3D"">What I have noticed = recently is, that the [KTLS] is missing. I have a stable/13<br = class=3D"">system which shows the [KTLS] thread and a very recent = -CURRENT that also shows<br class=3D"">the [KTLS] thread.<br = class=3D""><br class=3D"">The stable/13 and releng/14.0 systems both use = the GENERIC kernel, without any<br class=3D"">custom modifications.<br = class=3D""><br class=3D"">Loaded KLDs are also the same.<br class=3D""><br= class=3D"">Did I miss something, or is there something in releng/14.0 = missing, which<br class=3D"">is currenlty enabled in stable/13?<br = class=3D""></blockquote><br class=3D"">KTLS shall still work as = intended, the creation of it threads is deferred.<br class=3D""><br = class=3D"">See a72ee355646c (ktls: Defer creation of threads and zones = until first use)<br class=3D""><blockquote type=3D"cite" class=3D"">Run = ktls_init() when the first KTLS session is created rather than<br = class=3D"">unconditionally during boot. This avoids creating = unused threads and<br class=3D"">allocating unused resources on systems = which do not use KTLS.<br class=3D""></blockquote><br class=3D"">```<br = class=3D"">-SYSINIT(ktls, SI_SUB_SMP + 1, SI_ORDER_ANY, ktls_init, = NULL);<br class=3D"">```<br class=3D""></blockquote><br class=3D"">Seems = 14.0 only create one KTLS thread.<br class=3D""><br class=3D"">IIRC 13.2 = create one thread per core.<br class=3D""></blockquote><br class=3D"">That= part should not be different. There should always be one thread = per core.<br class=3D""></blockquote><span style=3D"caret-color: rgb(0, = 0, 0); font-family: Menlo-Regular; font-size: 13px; font-style: normal; = font-variant-caps: normal; font-weight: 400; letter-spacing: normal; = text-align: start; text-indent: 0px; text-transform: none; white-space: = normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; = text-decoration: none; float: none; display: inline !important;" = class=3D"">Just fyi, I see one thread/core.</span><br = style=3D"caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; = font-size: 13px; font-style: normal; font-variant-caps: normal; = font-weight: 400; letter-spacing: normal; text-align: start; = text-indent: 0px; text-transform: none; white-space: normal; = word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: = none;" class=3D""><span style=3D"caret-color: rgb(0, 0, 0); font-family: = Menlo-Regular; font-size: 13px; font-style: normal; font-variant-caps: = normal; font-weight: 400; letter-spacing: normal; text-align: start; = text-indent: 0px; text-transform: none; white-space: normal; = word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: = none; float: none; display: inline !important;" class=3D"">Did you = happen to do something like "ps ax" instead of "ps axHl"?</span><br = style=3D"caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; = font-size: 13px; font-style: normal; font-variant-caps: normal; = font-weight: 400; letter-spacing: normal; text-align: start; = text-indent: 0px; text-transform: none; white-space: normal; = word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: = none;" class=3D""></div></blockquote><div><br = class=3D""></div><div>Yes, <span style=3D"caret-color: rgb(0, 0, = 0); color: rgb(0, 0, 0);" class=3D"">I typed "ps auxx". </span>`ps = axHl` is the right way to get kernel threads.</div><div>Sorry for the = noise.</div><br class=3D""><blockquote type=3D"cite" class=3D""><div = class=3D""><br style=3D"caret-color: rgb(0, 0, 0); font-family: = Menlo-Regular; font-size: 13px; font-style: normal; font-variant-caps: = normal; font-weight: 400; letter-spacing: normal; text-align: start; = text-indent: 0px; text-transform: none; white-space: normal; = word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: = none;" class=3D""><span style=3D"caret-color: rgb(0, 0, 0); font-family: = Menlo-Regular; font-size: 13px; font-style: normal; font-variant-caps: = normal; font-weight: 400; letter-spacing: normal; text-align: start; = text-indent: 0px; text-transform: none; white-space: normal; = word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: = none; float: none; display: inline !important;" class=3D"">rick</span><br = style=3D"caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; = font-size: 13px; font-style: normal; font-variant-caps: normal; = font-weight: 400; letter-spacing: normal; text-align: start; = text-indent: 0px; text-transform: none; white-space: normal; = word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: = none;" class=3D""><span style=3D"caret-color: rgb(0, 0, 0); font-family: = Menlo-Regular; font-size: 13px; font-style: normal; font-variant-caps: = normal; font-weight: 400; letter-spacing: normal; text-align: start; = text-indent: 0px; text-transform: none; white-space: normal; = word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: = none; float: none; display: inline !important;" class=3D"">ps: I also = see a reclaim_0 thread.</span><br style=3D"caret-color: rgb(0, 0, 0); = font-family: Menlo-Regular; font-size: 13px; font-style: normal; = font-variant-caps: normal; font-weight: 400; letter-spacing: normal; = text-align: start; text-indent: 0px; text-transform: none; white-space: = normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; = text-decoration: none;" class=3D""><br style=3D"caret-color: rgb(0, 0, = 0); font-family: Menlo-Regular; font-size: 13px; font-style: normal; = font-variant-caps: normal; font-weight: 400; letter-spacing: normal; = text-align: start; text-indent: 0px; text-transform: none; white-space: = normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; = text-decoration: none;" class=3D""><blockquote type=3D"cite" = style=3D"font-family: Menlo-Regular; font-size: 13px; font-style: = normal; font-variant-caps: normal; font-weight: 400; letter-spacing: = normal; orphans: auto; text-align: start; text-indent: 0px; = text-transform: none; white-space: normal; widows: auto; word-spacing: = 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; = text-decoration: none;" class=3D""><br class=3D"">--<br class=3D"">John = Baldwin</blockquote></div></blockquote></div><br class=3D""><div = class=3D""> <div><br class=3D""></div> </div> <br class=3D""></body></html>= --Apple-Mail=_E2A72CED-7518-44EF-9F30-A7D526AA07AC--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?EF0D2F9C-805A-4185-9B61-D640776E64B0>