Re: [PATCH 10/10] oom: Make find_lock_task_mm() sparse-aware

2012-03-28 Thread David Rientjes
On Sat, 24 Mar 2012, Peter Zijlstra wrote: > Yeah, so Nacked-by: Peter Zijlstra > > Also, why didn't lockdep catch it? > > Fix sparse already instead of smearing ugly all over. > Fully agreed, please don't add this to the oom killer. ___ Linuxppc-de

Re: [PATCH 10/10] oom: Make find_lock_task_mm() sparse-aware

2012-03-24 Thread Peter Zijlstra
On Sat, 2012-03-24 at 20:21 +0400, Anton Vorontsov wrote: > Just wonder how do you see the feature implemented? > > Something like this? > > #define __ret_cond_locked(l, c) __attribute__((ret_cond_locked(l, c))) > #define __ret_value __attribute__((ret_value)) > #define __ret_loc

Re: [PATCH 10/10] oom: Make find_lock_task_mm() sparse-aware

2012-03-24 Thread Anton Vorontsov
On Sat, Mar 24, 2012 at 01:52:54PM +0100, Peter Zijlstra wrote: [...] > > p.s. I know Peter Zijlstra detest the __cond_lock() stuff, but untill > > we have anything better in sparse, let's use it. This particular > > patch helped me to detect one bug that I myself made during > > tas

Re: [PATCH 10/10] oom: Make find_lock_task_mm() sparse-aware

2012-03-24 Thread Peter Zijlstra
On Sat, 2012-03-24 at 14:31 +0400, Anton Vorontsov wrote: > This is needed so that callers would not get 'context imbalance' > warnings from the sparse tool. > > As a side effect, this patch fixes the following sparse warnings: > > CHECK mm/oom_kill.c > mm/oom_kill.c:201:28: warning: contex

[PATCH 10/10] oom: Make find_lock_task_mm() sparse-aware

2012-03-24 Thread Anton Vorontsov
This is needed so that callers would not get 'context imbalance' warnings from the sparse tool. As a side effect, this patch fixes the following sparse warnings: CHECK mm/oom_kill.c mm/oom_kill.c:201:28: warning: context imbalance in 'oom_badness' - unexpected unlock include/linux/rcupd