[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070706125324.GA74@tv-sign.ru>
Date: Fri, 6 Jul 2007 16:53:24 +0400
From: Oleg Nesterov <oleg@...sign.ru>
To: Johannes Berg <johannes@...solutions.net>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [PATCH 2/2] workqueue: debug work related deadlocks with lockdep
On 07/06, Johannes Berg wrote:
>
> On Thu, 2007-07-05 at 19:36 +0400, Oleg Nesterov wrote:
>
> > So, __WORK_INITIALIZER() uses work_struct itself as a "struct lock_class_key" ?
> > How so?
>
> Well, this is for work_structs that are static (not dynamically
> allocated.) struct lock_class_key is just a single byte because its
> whole purpose is to be a unique pointer, there's nothing actually in it.
> Hence, taking the address of the work struct (when it's statically
> allocated) is a unique pointer just as well.
Yes, got it, but forgot to reply to myself. But thanks for your confirmation
of my understanding.
I believe both patches are nice.
Oleg.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists