From nobody Sat May 14 21:27:18 2022 X-Original-To: dev-commits-src-all@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 697C11AD211B; Sat, 14 May 2022 21:27:19 +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 4L0z9y6Dx3z4k0x; Sat, 14 May 2022 21:27:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652563638; 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=4RGeOOUhRGOxhbB8ce3i8WAG4LxeCFc+Bm8e2C5XLvY=; b=cuXGd/ayqCIyQHoXwn8aKAu5pKUmE3eDnrhSKpcnSSawh7lge5YtVbs/X5teD46VjPhTXG JIiNMYftTUx2zRSZZLL2obAfnTT6byF/ya0F+iUY2/K9is7DhZuPSvkSLE//U0yAYVckSy HeSVcdsX8+hCgpXIAwPMgToaE7NhlOHz0Qw8+fPJLILpTyuyE/QdVsIRiVV2NFN2abGsVI qjNR0Jc3zBYZC6uYhTMU2oigwCFEXnfbKepiUmmxKFTuRPJRTwgL/x9HOGmOZyIShuc50e GEcvl+B0xsQYoTAPegAGbkTWUXuqtCL1vDH8oLS7Aky/W3IeRfO+BWzaASQT6Q== 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 92E511EAE6; Sat, 14 May 2022 21:27:18 +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 24ELRIUD099047; Sat, 14 May 2022 21:27:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24ELRIsb099046; Sat, 14 May 2022 21:27:18 GMT (envelope-from git) Date: Sat, 14 May 2022 21:27:18 GMT Message-Id: <202205142127.24ELRIsb099046@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 08135bd1fa6e - stable/13 - epair: unbind prior to returning to userspace List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 08135bd1fa6e57b3d9737dd6f58a5c71b5d3d6df Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652563639; 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=4RGeOOUhRGOxhbB8ce3i8WAG4LxeCFc+Bm8e2C5XLvY=; b=Dlxm3FLuXnjOSbFp/FQWy+/xNps6vxyUT1UEEUgBh5kZ5W9bvq41RThOmv5uiDLtEQEYKw wXQoLOtZ5dnTMMCjvYLI1onS3nL80XfDR0lFUR/gFE68TvcnHds1NwKvkmYcoafm8f6ePx +VPVLFL/uLuwQJJ5fqSLE7OPUMGpYqh86riT4hsfv6uz8rVaHia4xK/gkqS6nbpnb1XzAE cbrtFx0wd7B6aZ6YuBYFMvhdYMaVgNjyNEcA1dq/Sa2RtkUI+afdP2F37iqph9jbsUe4ZE BrdKI5TIfWKsSxfpCGmN6urj61ZRgjfWRaYunne+Z5gvUWrzDEpJIAywrhYeQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1652563639; a=rsa-sha256; cv=none; b=cqUCGb1o3h6dE7+8ci8Njn6rGxl6JVMwuH2cT8AiufxLq4XF0I5QjFFeWsNjGHr8OdRVQx AnUi3YqdFicQtjCux8Fhd96wyKZoOBjIIGWYnv1xGbsBv/6k7Q87s99/Wfu/OB2+YPEMik UVkQK492Um98SURXIlyfqQZd3CF4Ei1qSXA8fWmSpr6AQ5W7uHRtb36cNwn47/ojdYhEup EiHifmNRj7yH9GWdN7CzFGidUBaL5IDgXa1BIxCtfSeoqWD4qXYw9hmmrGPV9eZi1xsj4E 9J49BZGuvCR2Z0m+turfdvfI1g/gpJpvP8NskuneWrbRLV9kzmJRHUGFn9PQLw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=08135bd1fa6e57b3d9737dd6f58a5c71b5d3d6df commit 08135bd1fa6e57b3d9737dd6f58a5c71b5d3d6df Author: Kristof Provost AuthorDate: 2022-05-07 15:15:34 +0000 Commit: Kristof Provost CommitDate: 2022-05-14 09:10:47 +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 (cherry picked from commit cbbce42345c51536d7dc63643f47a3cbf87d647e) --- 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 2fe052f57486..e7257f5fa551 100644 --- a/sys/net/if_epair.c +++ b/sys/net/if_epair.c @@ -822,6 +822,9 @@ epair_mod_init() epair_tasks.tasks++; } + thread_lock(curthread); + sched_unbind(curthread); + thread_unlock(curthread); #else snprintf(name, sizeof(name), "epair_task");