[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5250C79A.8060103@gmail.com>
Date:	Sun, 06 Oct 2013 11:14:50 +0900
From:	Akira Hayakawa <ruby.wktk@...il.com>
To:	mpatocka@...hat.com
CC:	dm-devel@...hat.com, devel@...verdev.osuosl.org,
	thornber@...hat.com, snitzer@...hat.com, cesarb@...arb.net,
	gregkh@...uxfoundation.org, david@...morbit.com,
	linux-kernel@...r.kernel.org, tj@...nel.org, agk@...hat.com,
	joe@...ches.com, akpm@...ux-foundation.org, ejt@...hat.com,
	dan.carpenter@...cle.com, m.chehab@...sung.com, ruby.wktk@...il.com
Subject: Re: [dm-devel] dm-writeboost testing
Mikulas,
> The change seems ok. Please, also move this piece of code in flush_proc
> out of the spinlock:
>                         if (kthread_should_stop())
>                                 return 0;
> 
> It caused the workqueue warning I reported before and still causes warning 
> with kthreads:
> note: flush_daemon[5145] exited with preempt_count 1
You are right.
I fixed the bug.
diff --git a/Driver/dm-writeboost-daemon.c b/Driver/dm-writeboost-daemon.c
index 65974e2..cf790bf 100644
--- a/Driver/dm-writeboost-daemon.c
+++ b/Driver/dm-writeboost-daemon.c
@@ -29,7 +29,6 @@ int flush_proc(void *data)
                                cache->flush_wait_queue,
                                (!list_empty(&cache->flush_queue)),
                                msecs_to_jiffies(100));
-                       spin_lock_irqsave(&cache->flush_queue_lock, flags);
                        /*
                         * flush daemon can exit
@@ -37,6 +36,8 @@ int flush_proc(void *data)
                         */
                        if (kthread_should_stop())
                                return 0;
+                       else
+                               spin_lock_irqsave(&cache->flush_queue_lock, flags);
                }
> I will send you next email with more bugs that I found in your code
I will reply to you about this later.
So much bugs and some seems to be crucial.
Akira
--
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