lkml.org 
[lkml]   [2013]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] freezer: add unsafe versions of freezable helpers
Hi!

> NFS calls the freezable helpers with locks held, which is unsafe
> and caused lockdep warnings when 6aa9707 "lockdep: check that no
> locks held at freeze time" was applied (reverted in dbf520a).
> Add new *_unsafe versions of the helpers that will not run the
> lockdep test when 6aa9707 is reapplied, and call them from NFS.
>
> Signed-off-by: Colin Cross <ccross@android.com>

Looks mostly good.

> @@ -152,6 +169,14 @@ static inline bool freezer_should_skip(struct task_struct *p)
> freezer_count(); \
> })
>
> +/* DO NOT ADD ANY NEW CALLERS OF THIS FUNCTION */
> +#define freezable_schedule_unsafe() \
> +({ \
> + freezer_do_not_count(); \
> + schedule(); \
> + freezer_count_unsafe(); \
> +})
> +

Make it inline function? :-). Add short explanation why it is good
idea?

> +/* DO NOT ADD ANY NEW CALLERS OF THIS FUNCTION */
> +#define freezable_schedule_timeout_killable_unsafe(timeout) \
> +({ \
> + long __retval; \
> + freezer_do_not_count(); \
> + __retval = schedule_timeout_killable(timeout); \
> + freezer_count_unsafe(); \
> + __retval; \
> +})

Function too?
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


\
 
 \ /
  Last update: 2013-05-04 15:21    [W:2.243 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site