From: Peter Zijlstra <peterz@infradead.org> To: Christian Borntraeger <borntraeger@linux.ibm.com> Cc: vincent.guittot@linaro.org, linux-pm@vger.kernel.org, bigeasy@linutronix.de, Amit Shah <amit@kernel.org>, rjw@rjwysocki.net, linux-kernel@vger.kernel.org, rostedt@goodmis.org, mingo@kernel.org, Marc Hartmayer <mhartmay@linux.ibm.com>, mgorman@suse.de, oleg@redhat.com, tj@kernel.org, "virtualization@lists.linux-foundation.org" <virtualization@lists.linux-foundation.org>, will@kernel.org, dietmar.eggemann@arm.com, ebiederm@xmission.com Subject: Re: [PATCH v3 6/6] freezer,sched: Rewrite core freezer logic Date: Mon, 26 Sep 2022 20:06:46 +0200 [thread overview] Message-ID: <YzHqNiRj2Q5vxdCV@hirez.programming.kicks-ass.net> (raw) In-Reply-To: <9ec643f3-b935-0119-d8bc-1fbe46c36356@linux.ibm.com> On Mon, Sep 26, 2022 at 05:49:16PM +0200, Christian Borntraeger wrote: > Hmm, > > #define ___wait_is_interruptible(state) \ > (!__builtin_constant_p(state) || \ > state == TASK_INTERRUPTIBLE || state == TASK_KILLABLE) \ > > That would not trigger when state is also TASK_FREEZABLE, no? Spot on! signal_pending_state() writes that as: state & (TASK_INTERRUPTIBLE | TASK_WAKEKILL) which is the correct form. diff --git a/include/linux/wait.h b/include/linux/wait.h index 14ad8a0e9fac..7f5a51aae0a7 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h @@ -281,7 +281,7 @@ static inline void wake_up_pollfree(struct wait_queue_head *wq_head) #define ___wait_is_interruptible(state) \ (!__builtin_constant_p(state) || \ - state == TASK_INTERRUPTIBLE || state == TASK_KILLABLE) \ + (state & (TASK_INTERRUPTIBLE | TASK_WAKEKILL))) extern void init_wait_entry(struct wait_queue_entry *wq_entry, int flags); Let me go git-grep some to see if there's more similar fail. _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
WARNING: multiple messages have this Message-ID (diff)
From: Peter Zijlstra <peterz@infradead.org> To: Christian Borntraeger <borntraeger@linux.ibm.com> Cc: bigeasy@linutronix.de, dietmar.eggemann@arm.com, ebiederm@xmission.com, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, mgorman@suse.de, mingo@kernel.org, oleg@redhat.com, rjw@rjwysocki.net, rostedt@goodmis.org, tj@kernel.org, vincent.guittot@linaro.org, will@kernel.org, Marc Hartmayer <mhartmay@linux.ibm.com>, Amit Shah <amit@kernel.org>, "virtualization@lists.linux-foundation.org" <virtualization@lists.linux-foundation.org> Subject: Re: [PATCH v3 6/6] freezer,sched: Rewrite core freezer logic Date: Mon, 26 Sep 2022 20:06:46 +0200 [thread overview] Message-ID: <YzHqNiRj2Q5vxdCV@hirez.programming.kicks-ass.net> (raw) In-Reply-To: <9ec643f3-b935-0119-d8bc-1fbe46c36356@linux.ibm.com> On Mon, Sep 26, 2022 at 05:49:16PM +0200, Christian Borntraeger wrote: > Hmm, > > #define ___wait_is_interruptible(state) \ > (!__builtin_constant_p(state) || \ > state == TASK_INTERRUPTIBLE || state == TASK_KILLABLE) \ > > That would not trigger when state is also TASK_FREEZABLE, no? Spot on! signal_pending_state() writes that as: state & (TASK_INTERRUPTIBLE | TASK_WAKEKILL) which is the correct form. diff --git a/include/linux/wait.h b/include/linux/wait.h index 14ad8a0e9fac..7f5a51aae0a7 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h @@ -281,7 +281,7 @@ static inline void wake_up_pollfree(struct wait_queue_head *wq_head) #define ___wait_is_interruptible(state) \ (!__builtin_constant_p(state) || \ - state == TASK_INTERRUPTIBLE || state == TASK_KILLABLE) \ + (state & (TASK_INTERRUPTIBLE | TASK_WAKEKILL))) extern void init_wait_entry(struct wait_queue_entry *wq_entry, int flags); Let me go git-grep some to see if there's more similar fail.
next prev parent reply other threads:[~2022-09-26 18:07 UTC|newest] Thread overview: 94+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-08-22 11:18 [PATCH v3 0/6] Freezer Rewrite Peter Zijlstra 2022-08-22 11:18 ` [PATCH v3 1/6] freezer: Have {,un}lock_system_sleep() save/restore flags Peter Zijlstra 2022-08-23 17:25 ` Rafael J. Wysocki 2022-09-09 9:00 ` [tip: sched/core] " tip-bot2 for Peter Zijlstra 2022-08-22 11:18 ` [PATCH v3 2/6] freezer,umh: Clean up freezer/initrd interaction Peter Zijlstra 2022-08-23 17:28 ` Rafael J. Wysocki 2022-09-09 9:00 ` [tip: sched/core] " tip-bot2 for Peter Zijlstra 2022-08-22 11:18 ` [PATCH v3 3/6] sched: Change wait_task_inactive()s match_state Peter Zijlstra 2022-09-04 10:44 ` Ingo Molnar 2022-09-06 10:54 ` Peter Zijlstra 2022-09-07 7:23 ` Ingo Molnar 2022-09-07 9:29 ` Peter Zijlstra 2022-09-09 9:00 ` [tip: sched/core] sched: Rename task_running() to task_on_cpu() tip-bot2 for Peter Zijlstra 2022-09-07 9:30 ` [PATCH v3 3/6] sched: Change wait_task_inactive()s match_state Peter Zijlstra 2022-09-09 9:00 ` [tip: sched/core] " tip-bot2 for Peter Zijlstra 2022-08-22 11:18 ` [PATCH v3 4/6] sched/completion: Add wait_for_completion_state() Peter Zijlstra 2022-08-23 17:32 ` Rafael J. Wysocki 2022-08-26 21:54 ` Peter Zijlstra 2022-09-04 10:46 ` Ingo Molnar 2022-09-06 10:24 ` Peter Zijlstra 2022-09-07 7:35 ` Ingo Molnar 2022-09-07 9:24 ` Peter Zijlstra 2022-09-09 9:00 ` [tip: sched/core] " tip-bot2 for Peter Zijlstra 2022-08-22 11:18 ` [PATCH v3 5/6] sched/wait: Add wait_event_state() Peter Zijlstra 2022-09-04 9:54 ` Ingo Molnar 2022-09-06 11:08 ` Peter Zijlstra 2022-09-07 7:26 ` Ingo Molnar 2022-09-09 9:00 ` [tip: sched/core] " tip-bot2 for Peter Zijlstra 2022-08-22 11:18 ` [PATCH v3 6/6] freezer,sched: Rewrite core freezer logic Peter Zijlstra 2022-08-23 17:36 ` Rafael J. Wysocki 2022-09-04 10:09 ` Ingo Molnar 2022-09-06 11:23 ` Peter Zijlstra 2022-09-07 7:30 ` Ingo Molnar 2022-09-09 9:00 ` [tip: sched/core] sched: Show PF_flag holes tip-bot2 for Peter Zijlstra 2022-09-09 9:00 ` [tip: sched/core] freezer,sched: Rewrite core freezer logic tip-bot2 for Peter Zijlstra 2022-09-23 7:21 ` [PATCH v3 6/6] " Christian Borntraeger 2022-09-23 7:53 ` Christian Borntraeger 2022-09-26 8:06 ` Christian Borntraeger 2022-09-26 10:55 ` Christian Borntraeger 2022-09-26 12:13 ` Peter Zijlstra 2022-09-26 12:13 ` Peter Zijlstra 2022-09-26 12:32 ` Christian Borntraeger 2022-09-26 12:32 ` Christian Borntraeger 2022-09-26 12:55 ` Peter Zijlstra 2022-09-26 12:55 ` Peter Zijlstra 2022-09-26 13:23 ` Christian Borntraeger 2022-09-26 13:23 ` Christian Borntraeger 2022-09-26 13:37 ` Peter Zijlstra 2022-09-26 13:37 ` Peter Zijlstra 2022-09-26 13:54 ` Christian Borntraeger 2022-09-26 13:54 ` Christian Borntraeger 2022-09-26 15:49 ` Christian Borntraeger 2022-09-26 15:49 ` Christian Borntraeger 2022-09-26 18:06 ` Peter Zijlstra [this message] 2022-09-26 18:06 ` Peter Zijlstra 2022-09-26 18:22 ` Peter Zijlstra 2022-09-26 18:22 ` Peter Zijlstra 2022-09-27 5:35 ` Christian Borntraeger 2022-09-27 5:35 ` Christian Borntraeger 2022-09-28 5:44 ` Christian Borntraeger 2022-09-28 5:44 ` Christian Borntraeger 2022-10-21 17:22 ` Ville Syrjälä 2022-10-21 17:22 ` [Intel-gfx] [PATCH v3 6/6] freezer, sched: " Ville Syrjälä 2022-10-25 4:52 ` [PATCH v3 6/6] freezer,sched: " Ville Syrjälä 2022-10-25 4:52 ` [Intel-gfx] [PATCH v3 6/6] freezer, sched: " Ville Syrjälä 2022-10-25 10:49 ` [PATCH v3 6/6] freezer,sched: " Peter Zijlstra 2022-10-25 10:49 ` [Intel-gfx] [PATCH v3 6/6] freezer, sched: " Peter Zijlstra 2022-10-26 10:32 ` [PATCH v3 6/6] freezer,sched: " Ville Syrjälä 2022-10-26 10:32 ` [Intel-gfx] [PATCH v3 6/6] freezer, sched: " Ville Syrjälä 2022-10-26 11:43 ` Peter Zijlstra 2022-10-26 11:43 ` [PATCH v3 6/6] freezer,sched: " Peter Zijlstra 2022-10-26 12:12 ` [Intel-gfx] [PATCH v3 6/6] freezer, sched: " Peter Zijlstra 2022-10-26 12:12 ` [PATCH v3 6/6] freezer,sched: " Peter Zijlstra 2022-10-26 12:14 ` Peter Zijlstra 2022-10-26 12:14 ` [Intel-gfx] [PATCH v3 6/6] freezer, sched: " Peter Zijlstra 2022-10-27 5:58 ` [PATCH v3 6/6] freezer,sched: " Chen Yu 2022-10-27 5:58 ` [Intel-gfx] [PATCH v3 6/6] freezer, sched: " Chen Yu 2022-10-27 7:39 ` [PATCH v3 6/6] freezer,sched: " Peter Zijlstra 2022-10-27 7:39 ` [Intel-gfx] [PATCH v3 6/6] freezer, sched: " Peter Zijlstra 2022-10-27 13:09 ` [PATCH v3 6/6] freezer,sched: " Ville Syrjälä 2022-10-27 13:09 ` [Intel-gfx] [PATCH v3 6/6] freezer, sched: " Ville Syrjälä 2022-10-27 16:53 ` [PATCH v3 6/6] freezer,sched: " Peter Zijlstra 2022-10-27 16:53 ` [Intel-gfx] [PATCH v3 6/6] freezer, sched: " Peter Zijlstra 2022-11-02 16:57 ` [PATCH v3 6/6] freezer,sched: " Ville Syrjälä 2022-11-02 16:57 ` [Intel-gfx] [PATCH v3 6/6] freezer, sched: " Ville Syrjälä 2022-11-02 22:16 ` [PATCH v3 6/6] freezer,sched: " Peter Zijlstra 2022-11-02 22:16 ` [Intel-gfx] [PATCH v3 6/6] freezer, sched: " Peter Zijlstra 2022-11-07 11:47 ` [PATCH v3 6/6] freezer,sched: " Ville Syrjälä 2022-11-07 11:47 ` [Intel-gfx] [PATCH v3 6/6] freezer, sched: " Ville Syrjälä 2022-11-10 20:27 ` Ville Syrjälä 2022-11-10 20:27 ` Ville Syrjälä 2022-11-14 9:10 ` [tip: sched/urgent] sched: Fix race in task_call_func() tip-bot2 for Peter Zijlstra -- strict thread matches above, loose matches on Subject: below -- 2021-10-09 10:07 [PATCH v3 0/6] Freezer rewrite Peter Zijlstra 2021-10-09 10:08 ` [PATCH v3 6/6] freezer,sched: Rewrite core freezer logic Peter Zijlstra 2021-10-18 13:36 ` Peter Zijlstra
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=YzHqNiRj2Q5vxdCV@hirez.programming.kicks-ass.net \ --to=peterz@infradead.org \ --cc=amit@kernel.org \ --cc=bigeasy@linutronix.de \ --cc=borntraeger@linux.ibm.com \ --cc=dietmar.eggemann@arm.com \ --cc=ebiederm@xmission.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-pm@vger.kernel.org \ --cc=mgorman@suse.de \ --cc=mhartmay@linux.ibm.com \ --cc=mingo@kernel.org \ --cc=oleg@redhat.com \ --cc=rjw@rjwysocki.net \ --cc=rostedt@goodmis.org \ --cc=tj@kernel.org \ --cc=vincent.guittot@linaro.org \ --cc=virtualization@lists.linux-foundation.org \ --cc=will@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.