Re: [PATCH 2/3] mm: Extract might_alloc() debug check

2020-11-25 Thread Jason Gunthorpe
On Tue, Nov 24, 2020 at 03:34:11PM +0100, Daniel Vetter wrote: > On Fri, Nov 20, 2020 at 02:07:19PM -0400, Jason Gunthorpe wrote: > > On Fri, Nov 20, 2020 at 10:54:43AM +0100, Daniel Vetter wrote: > > > diff --git a/include/linux/sched/mm.h b/include/linux/sched/mm.h > > > index

Re: [PATCH 2/3] mm: Extract might_alloc() debug check

2020-11-24 Thread Daniel Vetter
On Fri, Nov 20, 2020 at 02:07:19PM -0400, Jason Gunthorpe wrote: > On Fri, Nov 20, 2020 at 10:54:43AM +0100, Daniel Vetter wrote: > > diff --git a/include/linux/sched/mm.h b/include/linux/sched/mm.h > > index d5ece7a9a403..f94405d43fd1 100644 > > --- a/include/linux/sched/mm.h > > +++

Re: [PATCH 2/3] mm: Extract might_alloc() debug check

2020-11-21 Thread Jason Gunthorpe
On Fri, Nov 20, 2020 at 10:54:43AM +0100, Daniel Vetter wrote: > diff --git a/include/linux/sched/mm.h b/include/linux/sched/mm.h > index d5ece7a9a403..f94405d43fd1 100644 > --- a/include/linux/sched/mm.h > +++ b/include/linux/sched/mm.h > @@ -180,6 +180,22 @@ static inline void

Re: [PATCH 2/3] mm: Extract might_alloc() debug check

2020-11-21 Thread Randy Dunlap
Hi, On 11/20/20 1:54 AM, Daniel Vetter wrote: > diff --git a/include/linux/sched/mm.h b/include/linux/sched/mm.h > index d5ece7a9a403..f94405d43fd1 100644 > --- a/include/linux/sched/mm.h > +++ b/include/linux/sched/mm.h > @@ -180,6 +180,22 @@ static inline void fs_reclaim_acquire(gfp_t gfp_mask)

Re: [PATCH 2/3] mm: Extract might_alloc() debug check

2020-11-20 Thread Daniel Vetter
On Fri, Nov 20, 2020 at 6:20 PM Randy Dunlap wrote: > > Hi, > > On 11/20/20 1:54 AM, Daniel Vetter wrote: > > diff --git a/include/linux/sched/mm.h b/include/linux/sched/mm.h > > index d5ece7a9a403..f94405d43fd1 100644 > > --- a/include/linux/sched/mm.h > > +++ b/include/linux/sched/mm.h > > @@

[PATCH 2/3] mm: Extract might_alloc() debug check

2020-11-20 Thread Daniel Vetter
Extracted from slab.h, which seems to have the most complete version including the correct might_sleep() check. Roll it out to slob.c. Motivated by a discussion with Paul about possibly changing call_rcu behaviour to allocate memory, but only roughly every 500th call. There are a lot fewer