Messages in this thread | | | From | Yosry Ahmed <> | Date | Fri, 31 Mar 2023 12:03:47 -0700 | Subject | Re: [PATCH v2 4/9] cgroup: rstat: add WARN_ON_ONCE() if flushing outside task context |
| |
On Fri, Mar 31, 2023 at 4:02 AM Michal Hocko <mhocko@suse.com> wrote: > > On Thu 30-03-23 01:53:38, Yosry Ahmed wrote: > [...] > > Maybe we can add a primitive like might_sleep() for this, just food for thought. > > I do not think it is the correct to abuse might_sleep if the function > itself doesn't sleep. If it does might_sleep is already involved.
Oh, sorry if I wasn't clear, I did not mean to reuse might_sleep() -- I meant introducing a new similar debug primitive that shouts if irqs are disabled.
> -- > Michal Hocko > SUSE Labs
| |