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>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] > On Nov 1, 2023, at 8:37 AM, Rick Macklem <rick.macklem@gmail.com> wrote: > > On Tue, Oct 31, 2023 at 10:06 AM John Baldwin <jhb@freebsd.org <mailto:jhb@freebsd.org>> wrote: >> >> On 10/30/23 3:41 AM, Zhenlei Huang wrote: >>> >>> >>>> On Oct 30, 2023, at 12:09 PM, Zhenlei Huang <zlei@FreeBSD.org> wrote: >>>> >>>> >>>> >>>>> On Oct 29, 2023, at 5:43 PM, Gordon Bergling <gbe@freebsd.org> wrote: >>>>> >>>>> Hi, >>>>> >>>>> 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. >>>>> >>>>> 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. >>>>> >>>>> The stable/13 and releng/14.0 systems both use the GENERIC kernel, without any >>>>> custom modifications. >>>>> >>>>> Loaded KLDs are also the same. >>>>> >>>>> Did I miss something, or is there something in releng/14.0 missing, which >>>>> is currenlty enabled in stable/13? >>>> >>>> KTLS shall still work as intended, the creation of it threads is deferred. >>>> >>>> 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. >>>> >>>> ``` >>>> -SYSINIT(ktls, SI_SUB_SMP + 1, SI_ORDER_ANY, ktls_init, NULL); >>>> ``` >>> >>> Seems 14.0 only create one KTLS thread. >>> >>> IIRC 13.2 create one thread per core. >> >> 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. > > rick > ps: I also see a reclaim_0 thread. > >> >> -- >> John Baldwin [-- Attachment #2 --] <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Nov 1, 2023, at 8:37 AM, Rick Macklem <<a href="mailto:rick.macklem@gmail.com" class="">rick.macklem@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta charset="UTF-8" class=""><span style="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="">On Tue, Oct 31, 2023 at 10:06 AM John Baldwin <</span><a href="mailto:jhb@freebsd.org" style="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="">jhb@freebsd.org</a><span style="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="">> wrote:</span><br style="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=""><blockquote type="cite" style="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=""><br class="">On 10/30/23 3:41 AM, Zhenlei Huang wrote:<br class=""><blockquote type="cite" class=""><br class=""><br class=""><blockquote type="cite" class="">On Oct 30, 2023, at 12:09 PM, Zhenlei Huang <<a href="mailto:zlei@FreeBSD.org" class="">zlei@FreeBSD.org</a>> wrote:<br class=""><br class=""><br class=""><br class=""><blockquote type="cite" class="">On Oct 29, 2023, at 5:43 PM, Gordon Bergling <<a href="mailto:gbe@freebsd.org" class="">gbe@freebsd.org</a>> wrote:<br class=""><br class="">Hi,<br class=""><br class="">I am currently building a new system, which should be based on 14.0-RELEASE.<br class="">Therefor I am tracking releng/14.0 since its creation and updating it currently<br class="">via the usualy buildworld steps.<br class=""><br class="">What I have noticed recently is, that the [KTLS] is missing. I have a stable/13<br class="">system which shows the [KTLS] thread and a very recent -CURRENT that also shows<br class="">the [KTLS] thread.<br class=""><br class="">The stable/13 and releng/14.0 systems both use the GENERIC kernel, without any<br class="">custom modifications.<br class=""><br class="">Loaded KLDs are also the same.<br class=""><br class="">Did I miss something, or is there something in releng/14.0 missing, which<br class="">is currenlty enabled in stable/13?<br class=""></blockquote><br class="">KTLS shall still work as intended, the creation of it threads is deferred.<br class=""><br class="">See a72ee355646c (ktls: Defer creation of threads and zones until first use)<br class=""><blockquote type="cite" class="">Run ktls_init() when the first KTLS session is created rather than<br class="">unconditionally during boot. This avoids creating unused threads and<br class="">allocating unused resources on systems which do not use KTLS.<br class=""></blockquote><br class="">```<br class="">-SYSINIT(ktls, SI_SUB_SMP + 1, SI_ORDER_ANY, ktls_init, NULL);<br class="">```<br class=""></blockquote><br class="">Seems 14.0 only create one KTLS thread.<br class=""><br class="">IIRC 13.2 create one thread per core.<br class=""></blockquote><br class="">That part should not be different. There should always be one thread per core.<br class=""></blockquote><span style="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="">Just fyi, I see one thread/core.</span><br style="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=""><span style="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="">Did you happen to do something like "ps ax" instead of "ps axHl"?</span><br style="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=""></div></blockquote><div><br class=""></div><div>Yes, <span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">I typed "ps auxx". </span>`ps axHl` is the right way to get kernel threads.</div><div>Sorry for the noise.</div><br class=""><blockquote type="cite" class=""><div class=""><br style="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=""><span style="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="">rick</span><br style="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=""><span style="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="">ps: I also see a reclaim_0 thread.</span><br style="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=""><br style="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=""><blockquote type="cite" style="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=""><br class="">--<br class="">John Baldwin</blockquote></div></blockquote></div><br class=""><div class=""> <div><br class=""></div> </div> <br class=""></body></html>help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?EF0D2F9C-805A-4185-9B61-D640776E64B0>
