From nobody Mon Nov 13 04:11:03 2023 X-Original-To: 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 4STGFQ165Sz50nBk for ; Mon, 13 Nov 2023 04:11:06 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4STGFQ0g1wz4J8n; Mon, 13 Nov 2023 04:11:06 +0000 (UTC) (envelope-from gbe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699848666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=acbVcmOoBPBHguQCQ0cRVJjfW/tD2Wfat1qantJOUxA=; b=orEFxTTH9movuCNTzzT8pLitigoygYe9+z/GKNvbjafnVC9+MxDeafm0V+FXKY8+T9yUcQ sx1b1jpRfd5cIzMB9QdHymS1ZWacwTJE5FMyaigbLe//V9T5iGDSpBdKoch8hjsqICTY7o suFVIIddFSkydPk50g9UQOrtuac3g2/qgnx0+MWTWzj9FD3/kHZvF4XEKWU8uqs6A+dk7e sqZreTMSN56dqQs0e252wgseqFtb5x3/DyQ6Jhcm5IV9e046HrVZGKMzaVgNepIu24uXav nk2dZSPKMjXY+/9++8vTLc8X+FrVUGOhHo1IfIiBaCz/0Ws/J/DzYhbzpFjWAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699848666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=acbVcmOoBPBHguQCQ0cRVJjfW/tD2Wfat1qantJOUxA=; b=OuKutXizh/+kQQZWrveDnorSrc7cDkJYzsziIdNpcdRCC2T570vu64V3yACC+AXpiXaWRw hgmsv2pxC1eeJk0JLX+ca+miVX9Aw6Ge+yC7OE7wQs9Hz+htR397m/qENj9zXOQdmFiuu2 ZdU/TES2xK0bt3+2co3xk7+emRAdY8OOwJrzsoEaCDssVmkdbpIAydFJsrdG9qcjWE/oSh xmlXy0/BJLbzKs10cFo/ld41UKdP+dNTOSglH2q3pywO2pJS3byYOfiW+5rjQrib6y58g7 d9n+5UnB9O3MaC9gl+8uc4Nb84Fsyo6e3MVvkhVJRON9WgUyRxhWYqLwczSDBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699848666; a=rsa-sha256; cv=none; b=P0cqDSefFQYmPOX4AgfIh7sWJdCi3+CDUPykzYUFQhpyTLWFaPQn+2sMGQY/g949s2Bu7x l0cs5RS0gLxiRUKmVNUhfhYfN9P5hpMi3waFQbM001wIHN63zlD8PeSeJdeW3htcDSmvDs bwrr8PPR3tB5BBaHGdKirizbY3kX8n8U/Nwsxn9WFlDgNft6caluCfhCbZbvMXG8hDedbu YF5fXCkGw4UebGTCOKGQ3VU/Mb5PiMsGLmIgqHwqf/CZ+vY+Dfzc3w+3kOUM3qYvjj4DMF 8+iw3Kaii9QBhRapTbJcXxUN32Ks/DuAjjecksXLIkycY14wWocddMUEWgK2cQ== Received: from localhost (p200300cb870909e461899cc7c6a0fa86.dip0.t-ipconnect.de [IPv6:2003:cb:8709:9e4:6189:9cc7:c6a0:fa86]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: gbe) by smtp.freebsd.org (Postfix) with ESMTPSA id 4STGFP3bW0z1M8p; Mon, 13 Nov 2023 04:11:05 +0000 (UTC) (envelope-from gbe@freebsd.org) Date: Mon, 13 Nov 2023 05:11:03 +0100 From: Gordon Bergling To: Zhenlei Huang Cc: Rick Macklem , John Baldwin , FreeBSD Current , gallatin@freebsd.org Subject: Re: KTLS thread on 14.0-RC3 Message-ID: References: <53AC8651-141E-4950-84D9-FD94E8B353FD@FreeBSD.org> <77952261-2fe0-428e-b72c-d805f0273a76@FreeBSD.org> 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 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Url: X-Operating-System: FreeBSD 14.0-RELEASE amd64 X-Host-Uptime: 5:07AM up 2 days, 10:07, 3 users, load averages: 0.51, 0.87, 0.61 Hi, On Wed, Nov 01, 2023 at 09:01:32AM +0800, Zhenlei Huang wrote: > > On Nov 1, 2023, at 8:37 AM, Rick Macklem wrote: > > On Tue, Oct 31, 2023 at 10:06 AM John Baldwin > wrote: > >> On 10/30/23 3:41 AM, Zhenlei Huang wrote: > >>>> On Oct 30, 2023, at 12:09 PM, Zhenlei Huang wrote: > >>>>> On Oct 29, 2023, at 5:43 PM, Gordon Bergling 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. Thanks for the information, I wasn't aware of this change. > >>>> 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. -- Gordon