lkml.org 
[lkml]   [2005]   [Mar]   [14]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateMon, 14 Mar 2005 08:02:30 +0100
FromIngo Molnar <>
SubjectRe: [PATCH] break_lock forever broken
* Hugh Dickins <hugh@veritas.com> wrote:

> @@ -187,6 +187,8 @@ void __lockfunc _##op##_lock(locktype##_
>  			cpu_relax();					\
>  		preempt_disable();					\
>  	}								\
> +	if ((lock)->break_lock)						\
> +		(lock)->break_lock = 0;					\

while writing the ->break_lock feature i intentionally avoided overhead
in the spinlock fastpath. A better solution for the bug you noticed is
to clear the break_lock flag in places that use need_lock_break()
explicitly.

One robust way for that seems to be to make the need_lock_break() macro
clear the flag if it sees it set, and to make all the other (internal)
users use __need_lock_break() that doesnt clear the flag. I'll cook up a
patch for this.

	Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:11    [from the cache]
©2003-2008