From nobody Sat May 07 19:58:13 2022 X-Original-To: dev-commits-src-main@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 5830B1AD5A57; Sat, 7 May 2022 19:58:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KwdXP58c4z3HY5; Sat, 7 May 2022 19:58:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651953493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bBZpQb+dE0xHMtBkX417AHghmNWUIritElsykhaEtb0=; b=EuaqXnwY/dHjEba/eRlM5HEc87MBnfnNOUbZlrc/U7LjOVibHfCORRyRExch0+l3o9eu6u 7hUB1GFkstwL6dXgjfRsKZq5veHUH6r999Dfjp3Rg40LcybbhVOhe34onBFEIGWuHK4hZA VCq9IzB0s3lcBEa7ExzTz2M6BN6gL5/NC6fm5OK0ex7liPrzi9kr6oyrUFIDJ6rZ0ttIZ6 ZZREpZzstZSzTPmqHUHTB3D1FB8nDImx3UrCjN36yP10Hv1WMJbLxMrIY6yp6PAzPZ55/S /XZiHHKrhZwv4vJ0VnSP2QP/xamqM/SCXC2qXlvsp86lf8vvW5DQM+zWLPHzUg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6B09116FA7; Sat, 7 May 2022 19:58:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 247JwDPe040407; Sat, 7 May 2022 19:58:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 247JwDKD040406; Sat, 7 May 2022 19:58:13 GMT (envelope-from git) Date: Sat, 7 May 2022 19:58:13 GMT Message-Id: <202205071958.247JwDKD040406@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: cbbce42345c5 - main - epair: unbind prior to returning to userspace List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cbbce42345c51536d7dc63643f47a3cbf87d647e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651953493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bBZpQb+dE0xHMtBkX417AHghmNWUIritElsykhaEtb0=; b=q6yBPAwQrTDdCM+YUXs1bYYEr9z8lozwXacXsosgZm8Jo4a14yWMjqGfMXM5jPt5dBV8uE dpiAjTc++uOH+Gi8v+Gw9XYMe6Q6VjGGIVTo5pTcJwGTyKhLByhEM9jyU17ZDrRGJGmYCx yMXsZLrHOGRdPTIGKojH3myfDmczCAO9lyVGDF7e1MF+qYNF26Sjdwto7u/+5JT7Yc3djE OUK0T9enSUsGQF15sKTjosjS9NJLupXncfCyS5ssdPRJwiw/wbWfxObqByV1wTUv1PGNl2 Zd0KyX1HtePS12k7qzpmsioUYuHn8I3Dgd/vvAUijqmDnB5QYL8j6NCcBdPoTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651953493; a=rsa-sha256; cv=none; b=NkXbR/goFvLemlHIZffrVhXNYZnmhiggKwrcP9YtyN/dqzlkXwWxWiwo4kohiEJb48umq8 Pldu/Jq1YeK1n4pTwSWZ2X5vhRYyGG1wxjGrok72vxiOl37NVWoGlLlOXBIakDpT5QZx+S pE7bzvpFpwo725OuQXF5k8Fy7dsWtRUZUrQenLzyu7JOUAuPfQMil+obeulZbEsPCyFWLU FE6ErQoVtszVcCuRlhSFed6mQnsiwlviPmZZDMl99QaNh3t5Q+EwJjlohRX8twpFrMayQd Gnz2f7FSRfvAaOBSzmcgAi1yZAlCkYFQ/RreBAfEy6zkoUpdWf+UZp71KNxEUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=cbbce42345c51536d7dc63643f47a3cbf87d647e commit cbbce42345c51536d7dc63643f47a3cbf87d647e Author: Kristof Provost AuthorDate: 2022-05-07 15:15:34 +0000 Commit: Kristof Provost 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");