Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Aug 2021 22:51:58 GMT
From:      Andrew Gallatin <gallatin@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 09066b98663d - main - ktls: Use the new PNOLOCK flag
Message-ID:  <202108052251.175MpwTC090873@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by gallatin:

URL: https://cgit.FreeBSD.org/src/commit/?id=09066b98663d92f4d129bab25105805adf0abaf7

commit 09066b98663d92f4d129bab25105805adf0abaf7
Author:     Andrew Gallatin <gallatin@FreeBSD.org>
AuthorDate: 2021-08-05 21:19:12 +0000
Commit:     Andrew Gallatin <gallatin@FreeBSD.org>
CommitDate: 2021-08-05 21:19:12 +0000

    ktls: Use the new PNOLOCK flag
    
    Use the new PNOLOCK flag to tsleep() to indicate that
    we are managing potential races, and don't need to
    sleep with a lock, or have a backstop timeout.
    
    Reviewed by: jhb
    Sponsored by: Netflix
---
 sys/kern/uipc_ktls.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c
index 47815c266667..1cc1f2e8b8c4 100644
--- a/sys/kern/uipc_ktls.c
+++ b/sys/kern/uipc_ktls.c
@@ -2240,7 +2240,7 @@ ktls_alloc_thread(void *ctx)
 	nbufs = 0;
 	for (;;) {
 		atomic_store_int(&sc->running, 0);
-		tsleep_sbt(sc, PZERO, "waiting for work", SBT_MAX, SBT_1S, 0);
+		tsleep(sc, PZERO | PNOLOCK, "-",  0);
 		atomic_store_int(&sc->running, 1);
 		sc->wakeups++;
 		if (nbufs != ktls_max_alloc) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202108052251.175MpwTC090873>