Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 May 2022 19:58:13 GMT
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: cbbce42345c5 - main - epair: unbind prior to returning to userspace
Message-ID:  <202205071958.247JwDKD040406@gitrepo.freebsd.org>

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

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

commit cbbce42345c51536d7dc63643f47a3cbf87d647e
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2022-05-07 15:15:34 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2022-05-07 16:17:33 +0000

    epair: unbind prior to returning to userspace
    
    If 'options RSS' is set we bind the epair tasks to different CPUs. We
    must take care to not keep the current thread bound to the last CPU when
    we return to userspace.
    
    MFC after:      1 week
    Sponsored by:   Orange Business Services
---
 sys/net/if_epair.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sys/net/if_epair.c b/sys/net/if_epair.c
index e9b056ef2bd6..21e50b5171aa 100644
--- a/sys/net/if_epair.c
+++ b/sys/net/if_epair.c
@@ -826,6 +826,9 @@ epair_mod_init(void)
 
 		epair_tasks.tasks++;
 	}
+	thread_lock(curthread);
+	sched_unbind(curthread);
+	thread_unlock(curthread);
 #else
 	snprintf(name, sizeof(name), "epair_task");
 



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