From nobody Tue Aug 2 18:12:21 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 4Ly3462znhz4XrDW; Tue, 2 Aug 2022 18:12:22 +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 4Ly3461yQvz40mk; Tue, 2 Aug 2022 18:12:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659463942; 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=eaq90Y1xqDtXqjexroVWYnyOvfk0NhFL+hiz65vn3Xs=; b=uFc+rt0EJmTx9UsUx8lbTV/yRm2vq9D2Ykp8te2hhkv6j6GKMIliQ3Dt7Tf2xwtcexcty1 tYcYizrhBc1BLiVmmWQhUL3ItQVC51mD8E/Ia+gAap2d5AtiuPSrrqZlOUPAkWC5AAZVcq LAuvcr0OLnz+bO4bRAC8zYxalxa2AehsBfgQfAEK5xjNH3pOm7qunFLZUfXJRR6s54Vl5+ jQJvKAMFk7pK2Bz62AS195dFHwe5eLQ8cyThZIEfmg+IMyPwsgUY81shzh0lFLB/UVe0Si fx6jUkdsh24xQEffk3BDTytCnt9hxvgXHc1kipj0Q63Ah//Se8tfq6VANtobzA== 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 4Ly3460NkBzM8h; Tue, 2 Aug 2022 18:12:22 +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 272ICLbO000651; Tue, 2 Aug 2022 18:12:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 272ICLoH000650; Tue, 2 Aug 2022 18:12:21 GMT (envelope-from git) Date: Tue, 2 Aug 2022 18:12:21 GMT Message-Id: <202208021812.272ICLoH000650@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: f04f3afbf5c3 - main - linuxkpi: more precise need_resched() definition 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: f04f3afbf5c3e3d7c5a4d628bc901151a62a0625 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659463942; 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=eaq90Y1xqDtXqjexroVWYnyOvfk0NhFL+hiz65vn3Xs=; b=E2mzI7g3ACuk1TRn47IUAkLX0RlkkqLB2vuac7tYr55cO5ZAngGnhVdbruM9VJBUeQg+lZ DmnhjjmD2au7PODK212okAoN1YhhmLLJ+INcFhsjxV9IRPc8kVyrITiZQLi1FiL/YYWDDl MBH4Dbei88rUDihiv0zAJ07ohr2pBN4qaNark8DA6jFOUy0YjJLEfQK6Np7hYcv83WmIez z93t5weV+Q2XqPX7Te7mS/3OAwNgXjse6PtlvfGcndGiY7wGGpByIG8dme4T4+Z+z8lHWd SNnOEnmkU1MhMz4X9RHPUnOVgi2TGD6suu8i782L67cxfxVCtJzn1MJzXV8WIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1659463942; a=rsa-sha256; cv=none; b=eZe6pfoVWQ/bAp8iMHlLWTTsLWohEQ1fd6fxtwl4+nJYn5qgHu/NnnCBjwTQUUONUA+p+Z EbmWkHGhJWVN8Cw7gtVD4iFITihWidRKxLyXizdkVHwL7Cr4zr4b/42Q9sRv88iOvu5dUz ffJK9siTbqfChzd8SWA4eiv56ml7CyHwG5ca8kcEFvahGSgRb8B4Cm6B3LJir+CCOZpUr7 tREFFiGVKEehtqvoDMvKhavBDTsiLvvZXk+mkOuDeuEiBM9VReu0XOUDZLBMObIckDfPqQ qjGfJ2NbKJKBOsU9Bp1ytvnc/m8D+KeQwXaseLTqhCt5C0leP6yZFoy74qvzDg== 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=f04f3afbf5c3e3d7c5a4d628bc901151a62a0625 commit f04f3afbf5c3e3d7c5a4d628bc901151a62a0625 Author: Konstantin Belousov AuthorDate: 2022-07-28 12:06:30 +0000 Commit: Konstantin Belousov CommitDate: 2022-08-02 18:11:10 +0000 linuxkpi: more precise need_resched() definition Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D35888 --- sys/compat/linuxkpi/common/include/linux/sched.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/sched.h b/sys/compat/linuxkpi/common/include/linux/sched.h index a0bcd1260b82..24014e71cda6 100644 --- a/sys/compat/linuxkpi/common/include/linux/sched.h +++ b/sys/compat/linuxkpi/common/include/linux/sched.h @@ -130,7 +130,8 @@ put_task_struct(struct task_struct *task) #define yield() kern_yield(PRI_UNCHANGED) #define sched_yield() sched_relinquish(curthread) -#define need_resched() td_ast_pending(curthread, TDA_SCHED) +#define need_resched() (curthread->td_owepreempt || \ + td_ast_pending(curthread, TDA_SCHED)) static inline int cond_resched_lock(spinlock_t *lock)