From nobody Thu Jul 14 20:15:35 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 4LkQj425Snz4T4CR; Thu, 14 Jul 2022 20:15:36 +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 4LkQj41HzYz3TLB; Thu, 14 Jul 2022 20:15:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657829736; 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=jzWfCCGHvkjJHmUaXHKV2E/ytkNXGZN5pJd41juvSSs=; b=Pn4+m7jE2VHwinCaka5y9kxNqkIb4+wSh2Ktox2w5onokvjeTdq0KDWJVd7PRViw9oPz0U aEXrQvp9ixwbOFrXLU2rIZ69LhG9fGhyr2FBKyE8aptB4KxtlE3HUnFrDtBKfPtt7HcME5 OvuchR7WAmQbRfBvfqDWhHvE8wUPVuU9kULG0oeBZnVqwPF22vHJpddGP87UgO+h6BX2UT zAzbMNwIScK0QSqdGgIlWGG9QFLPAMCk0JeYlKXeNz3gj5PTM5zCUFK+h/2DbAW8IUgdDp FA2dzFxtfzX8C7pVU68HhrBPiq2RLIjLrMKFX4MhiRPqCTI7H6A/YAzRxS0fbw== 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 4LkQj409BHzGPc; Thu, 14 Jul 2022 20:15:36 +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 26EKFZSZ088275; Thu, 14 Jul 2022 20:15:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26EKFZOf088274; Thu, 14 Jul 2022 20:15:35 GMT (envelope-from git) Date: Thu, 14 Jul 2022 20:15:35 GMT Message-Id: <202207142015.26EKFZOf088274@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: ed998d1c24db - main - ithreads: Support priority adjustment by schedulers. 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ed998d1c24dba600cf5fdf669370f1e2dfad3e47 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657829736; 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=jzWfCCGHvkjJHmUaXHKV2E/ytkNXGZN5pJd41juvSSs=; b=KlKfCOYlqvANz9kyftC+YNQRU5xvc639WdJbsP+3qjf9/0fgzRgv9wLbfLc4BS8VlMs+8o lwMQ0/V4RibNGmmsQbDDpvJp7ncjKUJ2Bkngxrm+PbS8+ogxDObKREDeMiTshAVX7qIuIX 5P1c22UqFhL7hdSWa3dxuHaQhqglOGAvblxdBmVgsHweKZ9d4mDNTZi7hBY2Rm9oji6QRM Ljcxl05uUBU+DfoG+oE69basTKsFjzv8nWkCYDghZWVpnN4TrJm3hNFDmLNfRVz+ZsA62s COxDLbT3nUBgzVcBNN/T59vdW0BfODhayKvzRMbXpqBFKA9iuhZp/7V8xwgjrA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657829736; a=rsa-sha256; cv=none; b=t3PdbhIdUfKUtKJWvUcM3ccBSLIs+eF2sR2UGvB5Xa6Py14K9NBm63rv0abWWLq1WfRM/7 fKpVnOBx5+q8Yo2BePAO9pAzupUwX+Y1y46+1CwVwMl9a54ZNSyyo7r3olK5lO3+9dQXIA 9SMnu7s+4me9b2Sv7P4IU5+JkkNPioPephNCIaF6QSokf3M2tjo3feoItyGn2MGjfvSeP8 Y9aJFuI7kkCH6sfGNw/dq0anuf0PBBeYJnuEK7fq8XDbCUEq4es9UZag2H2hk0HtE3VUL1 poRCgPLPuGieFpfmkvwYS8nr20rA1/0WHVZ/ewLcd6gM1UglqLXLRAGhS16fwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ed998d1c24dba600cf5fdf669370f1e2dfad3e47 commit ed998d1c24dba600cf5fdf669370f1e2dfad3e47 Author: John Baldwin AuthorDate: 2022-07-14 20:13:35 +0000 Commit: John Baldwin CommitDate: 2022-07-14 20:13:35 +0000 ithreads: Support priority adjustment by schedulers. Use sched_wakeup instead of sched_add when marking an ithread runnable. This allows schedulers to reset their internal time slice tracking state and restore the base ithread priority when an ithread resumes from idle. Reviewed by: markj Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D35643 --- sys/kern/kern_intr.c | 4 ++-- sys/kern/kern_timeout.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c index 693c5595ba31..3cd80f63704f 100644 --- a/sys/kern/kern_intr.c +++ b/sys/kern/kern_intr.c @@ -589,7 +589,7 @@ ithread_destroy(struct intr_thread *ithread) ithread->it_flags |= IT_DEAD; if (TD_AWAITING_INTR(td)) { TD_CLR_IWAIT(td); - sched_add(td, SRQ_INTR); + sched_wakeup(td, SRQ_INTR); } else thread_unlock(td); } @@ -1020,7 +1020,7 @@ intr_event_schedule_thread(struct intr_event *ie, struct trapframe *frame) CTR3(KTR_INTR, "%s: schedule pid %d (%s)", __func__, td->td_proc->p_pid, td->td_name); TD_CLR_IWAIT(td); - sched_add(td, SRQ_INTR); + sched_wakeup(td, SRQ_INTR); } else { #ifdef HWPMC_HOOKS it->it_waiting++; diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c index 621ea258f21c..23ddd03ae72e 100644 --- a/sys/kern/kern_timeout.c +++ b/sys/kern/kern_timeout.c @@ -559,7 +559,7 @@ next: thread_lock_block_wait(td); THREAD_LOCK_ASSERT(td, MA_OWNED); TD_CLR_IWAIT(td); - sched_add(td, SRQ_INTR); + sched_wakeup(td, SRQ_INTR); } else mtx_unlock_spin_flags(&cc->cc_lock, MTX_QUIET); } else