From nobody Mon Jun 13 19:33:31 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 B39EE854BC7; Mon, 13 Jun 2022 19:33:32 +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 4LMMDr0pcbz3pqs; Mon, 13 Jun 2022 19:33:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655148812; 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=gkiPxNSFnJFhBSNiqWpc2YMKjwJeNnOy1D+lGbnF7t4=; b=oojdQRdDJoEfLRww2ocJQHk9XiHN12Zxtx1VuxG+WU+hbKYThS+N9RUuPV2Chs1AMxsRho qF3eKMZ4f9Oq+ny8LH9JkUdpFFXSn1ebi7xtEk2Xnyh0VZoIwrprW0O3NMPGPXCVGQDoZM PMXk6ZElt4Zxcj6Hn6U/DPvSBw2wltQyiRRxA38SHVSKD0JTndYdou+7iOUBlKzFvz3BqD FYkft3Pk+75iw68vyIeWfvMjECVy4fhbvg7Z/VOQhuKX6n59kPIOCfJNkDkyfXXl3hj3B+ +C1ou2jikOrmHVQW5QqC9z57UoJZzSJbDSjxo1uQAwW8ZvSLRTHf/pnTZFsCYA== 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 D4FC91BDBF; Mon, 13 Jun 2022 19:33:31 +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 25DJXVUO023588; Mon, 13 Jun 2022 19:33:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25DJXVVA023587; Mon, 13 Jun 2022 19:33:31 GMT (envelope-from git) Date: Mon, 13 Jun 2022 19:33:31 GMT Message-Id: <202206131933.25DJXVVA023587@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: b9893b353312 - main - weed_inhib(): do not double-suspend already suspended thread if the loop reiterates 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b9893b353312cc3c75a0ab2ff7ca69dc55864bea Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655148812; 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=gkiPxNSFnJFhBSNiqWpc2YMKjwJeNnOy1D+lGbnF7t4=; b=oJq3xckBUrNmEva+HO9I9IPDvNE+DzaRjU4ivhj1tv35Qlxd9Oa4ExVAkG65GigKTEH4sW w0iP98feH8SKe02qhHM2Uvix1ZTqZcIiGAVEx+RkI3z+Rrg2rsB0QxRPZYDLVl0CiMf9aq AYOXFLUWQCSs3GILeCOy3Vbp7W36i/DCZbM8nwei2n+ztZngOvAobjjSWagA/R4hHait2M o7hisdSp1uyDUgg2HRVTQJF8Lv7WaSsnjBgPM/Hoz0kIEKAK/3I9ix10lhsNqad3wHJzIr ucJhEkHnnR/ZnQuyNx25prHEJfAZM8RHyw6cEn3knE9WnkAMR4HAGLqyH5Ipng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655148812; a=rsa-sha256; cv=none; b=LXaTaIBrkA2yeFX8zb6r7IhXzqJUm+TTcSdh+MBr3SrVRmGXGVunNEBegIStEoXLOU8/0O s5AU4l4MAtLeIKQWS7u2w3OyKEACHq1CcJ0iH/NS32XxiekraAfzajKVmI3uhQj9AH5eJt olW3vaihoTxidbXYkvh4bkXtPb47jCjew2fr7bjGAQVbAkhntgzsIrIEifLsulUZRRE34D KJVnFDQu14NkSdqyQl2Qw+kwoK+rkkJFu3glT3R4BydZwiuDDxLTgYbaud5LdG+iKrePzl j/77rPhT/w6Tkw27enAMTx5xjg6GXBivswSiq2L80dfXigT75vxsBPwtxOrTew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b9893b353312cc3c75a0ab2ff7ca69dc55864bea commit b9893b353312cc3c75a0ab2ff7ca69dc55864bea Author: Konstantin Belousov AuthorDate: 2022-04-30 23:30:13 +0000 Commit: Konstantin Belousov CommitDate: 2022-06-13 19:30:02 +0000 weed_inhib(): do not double-suspend already suspended thread if the loop reiterates In collaboration with: pho Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D35310 --- sys/kern/kern_thread.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 4dd8dbdfb5a7..1247d842beb1 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -1156,7 +1156,8 @@ restart: } if (TD_CAN_ABORT(td2)) { if ((td2->td_flags & TDF_SBDRY) == 0) { - thread_suspend_one(td2); + if (!TD_IS_SUSPENDED(td2)) + thread_suspend_one(td2); td2->td_flags |= TDF_ALLPROCSUSP; } else { wakeup_swapper |= sleepq_abort(td2, ERESTART);