From nobody Mon Oct 30 10:41:40 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 4SJqZh4xvwz4xlS2 for ; Mon, 30 Oct 2023 10:41:48 +0000 (UTC) (envelope-from zlei@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 4SJqZh4X1vz4Trm; Mon, 30 Oct 2023 10:41:48 +0000 (UTC) (envelope-from zlei@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698662508; 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: in-reply-to:in-reply-to:references:references; bh=rKr57jjqZMslwVZLiq8w8hnQDupGMrMtueXCmSsA4rI=; b=JsLiACILjCS9KTmqrmBcO5Z693CtCdwB10Zc/rFD4Aly1qSqbSorMzjCDFrb5H3OzTGAJO 2Mato3ht6SaQrqIy6stlC23inj++Tvwvl4MPrRn3h0wY+OUDU1HcVE4f8oZjdB3+3elTYK aGYwB6ahlxBBKjnkZ0QHEY4E2C1Ar/IpcR1iligT4TJfecti/ygRwm1ddYp/klhL+4pDeI bweTRQrW1v2rrC47cl5tzW/jiQtpGuBKA1pv/aihgXdb+VQDXpYRwGo6ITODqcTt1T/rNu 94TCyokqbEFVfSPjK5783jan25dBZropFIkvgliIlxwLGBKG4lqsFKJ6KuT2UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698662508; 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: in-reply-to:in-reply-to:references:references; bh=rKr57jjqZMslwVZLiq8w8hnQDupGMrMtueXCmSsA4rI=; b=uqmFk6+2D4GeokIahBvCnWPfsycub47gyCbTF9HYy93OV+Pzgv2I5OPORVXorkhSV9hF4X E31BC+nlrR8q+WvKsbL48re3zH9KtnUS5ePLqBu9su+AEczanNV+HaaFs0zdya4S+qyJrX 07BBfHfIgb+nuk5fePkWNNDmJenIOLRFSwPwjkedXyUq1lL1r9n9+kqAZ9QCEY/KfU2PtX xCjG5i73RcBwFFx7ArtepB/8PRKv2Tjext2nlWmfGfISOMOg6uaZkGWQapmOJS6f+PlANb tM3wzQZ5z4cKWa4fCHOcdpnV0dtFb8qaIVdctQj0Ogg7ZKl//P8HvvdaFIdHfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698662508; a=rsa-sha256; cv=none; b=i/ZG+0kEtIdTK0Gi2ieKv5vQQyAoRV9mo5DZiCCIvJ69gA7V8QyoYnGSHrMcILDhDtNJY+ MGrP/zZBjVDHqAv5lXIys44jqaNs6rhNGhfsQsr589EEajYsUN4kQf8UyXKbMVc1DSWFzz NBdie/PFv7pgEUyeXhEZG2lVPNb4TjYGj/MWlQGVBhOAtwWCOui6NtUxWqf8DbgkdjS/K4 V9kDGMWTLunmM1/HEMbTaCLAQrJsKvkoV4wTgQHDGqStN5AGMQMCDkpNc0rBeRh50g/ekJ Yjs02aw8Ei0scLVTzt11p9m+T7FkGeaG8LreBlL8vCj27SnR0vbRJAyGa75eDg== Received: from smtpclient.apple (unknown [112.66.185.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: zlei/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4SJqZg07mpz18gS; Mon, 30 Oct 2023 10:41:46 +0000 (UTC) (envelope-from zlei@FreeBSD.org) From: Zhenlei Huang Message-Id: <53AC8651-141E-4950-84D9-FD94E8B353FD@FreeBSD.org> Content-Type: multipart/alternative; boundary="Apple-Mail=_35A4EFE7-AC3E-4F7D-AC0C-C61CB780B6B4" 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 (Mac OS X Mail 16.0 \(3696.120.41.1.4\)) Subject: Re: KTLS thread on 14.0-RC3 Date: Mon, 30 Oct 2023 18:41:40 +0800 In-Reply-To: Cc: FreeBSD Current , John Baldwin To: Gordon Bergling References: X-Mailer: Apple Mail (2.3696.120.41.1.4) --Apple-Mail=_35A4EFE7-AC3E-4F7D-AC0C-C61CB780B6B4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Oct 30, 2023, at 12:09 PM, Zhenlei Huang wrote: >=20 >=20 >=20 >> On Oct 29, 2023, at 5:43 PM, Gordon Bergling 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); > ``` Seems 14.0 only create one KTLS thread. IIRC 13.2 create one thread per core. >=20 >>=20 >> Any help for getting an insight on this would be much appreciated. >>=20 >> --Gordon >=20 >=20 > Best regards, > Zhenlei --Apple-Mail=_35A4EFE7-AC3E-4F7D-AC0C-C61CB780B6B4 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii

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.



Any help for getting = an insight on this would be much appreciated.

--Gordon


Best regards,
Zhenlei



= --Apple-Mail=_35A4EFE7-AC3E-4F7D-AC0C-C61CB780B6B4--