All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] workqueue: annotate lock context change
@ 2010-08-22 14:19 Namhyung Kim
  2010-08-23  9:38 ` Tejun Heo
  0 siblings, 1 reply; 2+ messages in thread
From: Namhyung Kim @ 2010-08-22 14:19 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-kernel

Some of internal functions called within gcwq->lock context releases and
regrabs the lock but were missing proper annotations. Add it.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
---
 kernel/workqueue.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 2994a0e..be0b71d 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1485,6 +1485,8 @@ static void gcwq_mayday_timeout(unsigned long __gcwq)
  * otherwise.
  */
 static bool maybe_create_worker(struct global_cwq *gcwq)
+__releases(&gcwq->lock)
+__acquires(&gcwq->lock)
 {
 	if (!need_to_create_worker(gcwq))
 		return false;
@@ -1722,6 +1724,8 @@ static void cwq_dec_nr_in_flight(struct cpu_workqueue_struct *cwq, int color)
  * spin_lock_irq(gcwq->lock) which is released and regrabbed.
  */
 static void process_one_work(struct worker *worker, struct work_struct *work)
+__releases(&gcwq->lock)
+__acquires(&gcwq->lock)
 {
 	struct cpu_workqueue_struct *cwq = get_work_cwq(work);
 	struct global_cwq *gcwq = cwq->gcwq;
@@ -3230,6 +3234,8 @@ static int __cpuinit trustee_thread(void *__gcwq)
  * multiple times.  To be used by cpu_callback.
  */
 static void __cpuinit wait_trustee_state(struct global_cwq *gcwq, int state)
+__releases(&gcwq->lock)
+__acquires(&gcwq->lock)
 {
 	if (!(gcwq->trustee_state == state ||
 	      gcwq->trustee_state == TRUSTEE_DONE)) {
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/2] workqueue: annotate lock context change
  2010-08-22 14:19 [PATCH 1/2] workqueue: annotate lock context change Namhyung Kim
@ 2010-08-23  9:38 ` Tejun Heo
  0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2010-08-23  9:38 UTC (permalink / raw)
  To: Namhyung Kim; +Cc: linux-kernel

On 08/22/2010 04:19 PM, Namhyung Kim wrote:
> Some of internal functions called within gcwq->lock context releases and
> regrabs the lock but were missing proper annotations. Add it.
> 
> Signed-off-by: Namhyung Kim <namhyung@gmail.com>

applied to wq#for-linus.  Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-08-23  9:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-22 14:19 [PATCH 1/2] workqueue: annotate lock context change Namhyung Kim
2010-08-23  9:38 ` Tejun Heo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.