Date: Tue, 2 Aug 2022 18:12:21 GMT From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: f04f3afbf5c3 - main - linuxkpi: more precise need_resched() definition Message-ID: <202208021812.272ICLoH000650@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f04f3afbf5c3e3d7c5a4d628bc901151a62a0625 commit f04f3afbf5c3e3d7c5a4d628bc901151a62a0625 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2022-07-28 12:06:30 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> 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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202208021812.272ICLoH000650>