dm-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Akira Hayakawa <ruby.wktk@gmail.com>
To: mpatocka@redhat.com
Cc: dm-devel@redhat.com, devel@driverdev.osuosl.org,
	thornber@redhat.com, snitzer@redhat.com, cesarb@cesarb.net,
	gregkh@linuxfoundation.org, david@fromorbit.com,
	linux-kernel@vger.kernel.org, tj@kernel.org, agk@redhat.com,
	joe@perches.com, akpm@linux-foundation.org, ejt@redhat.com,
	dan.carpenter@oracle.com, m.chehab@samsung.com,
	ruby.wktk@gmail.com
Subject: Re: [dm-devel] dm-writeboost testing
Date: Sun, 06 Oct 2013 11:14:50 +0900	[thread overview]
Message-ID: <5250C79A.8060103@gmail.com> (raw)
In-Reply-To: <alpine.LRH.2.02.1310052044070.30547@file01.intranet.prod.int.rdu2.redhat.com>

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

      reply	other threads:[~2013-10-06  2:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-03  0:15 dm-writeboost testing Mikulas Patocka
2013-10-03 13:27 ` [dm-devel] " Akira Hayakawa
2013-10-04 15:03   ` Joe Thornber
2013-10-04  2:28 ` Akira Hayakawa
2013-10-04 13:38   ` Mikulas Patocka
2013-10-04 14:25     ` Akira Hayakawa
2013-10-04 15:56       ` Mikulas Patocka
2013-10-05  7:05         ` [dm-devel] " Akira Hayakawa
2013-10-06  0:47           ` Mikulas Patocka
2013-10-06  2:14             ` Akira Hayakawa [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5250C79A.8060103@gmail.com \
    --to=ruby.wktk@gmail.com \
    --cc=agk@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=cesarb@cesarb.net \
    --cc=dan.carpenter@oracle.com \
    --cc=david@fromorbit.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=dm-devel@redhat.com \
    --cc=ejt@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    --cc=mpatocka@redhat.com \
    --cc=snitzer@redhat.com \
    --cc=thornber@redhat.com \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).