All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@linux.intel.com>
To: chetan loke <loke.chetan@gmail.com>
Cc: Tim Chen <tim.c.chen@linux.intel.com>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	linux-scsi@vger.kernel.org,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Andi Kleen <ak@linux.intel.com>
Subject: Re: SCSI RAM driver ported to 3.3 kernel for file system and I/O testing
Date: Wed, 16 May 2012 15:35:06 -0400	[thread overview]
Message-ID: <20120516193506.GM22985@linux.intel.com> (raw)
In-Reply-To: <CAAsGZS6KJ6jN+0B2Q06gXivaWfMVKX9t-yCYNwZDZ_jzUopviw@mail.gmail.com>

On Wed, May 16, 2012 at 03:31:55PM -0400, chetan loke wrote:
> > +               if (list_empty(&ram_device->commands))
> > +                       wake_up_process(ram_device->thread);
> 
> Didn't look in detail but if the queue is empty then why would you
> want to wake up the kthread? What if you just wake_up after
> list_add_tail below?

If the list is non-empty, then the kthread has already been woken up
and doesn't need to be woken again.

> > +               list_add_tail(&ram_cmnd->queue, &ram_device->commands);
> > +               spin_unlock_irqrestore(shost->host_lock, flags);
> > +       } else {
> > +               scsi_ram_execute_command(cmnd);
> > +       }
> 
> 
> Chetan Loke

  reply	other threads:[~2012-05-16 19:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-16 17:07 SCSI RAM driver ported to 3.3 kernel for file system and I/O testing Tim Chen
2012-05-16 17:18 ` Joe Perches
2012-05-16 19:02   ` Tim Chen
2012-05-16 17:41 ` Bart Van Assche
2012-05-16 19:31 ` chetan loke
2012-05-16 19:35   ` Matthew Wilcox [this message]
2012-05-16 19:37     ` chetan loke
2012-05-16 19:43       ` Matthew Wilcox
2012-05-16 19:43         ` Matthew Wilcox
2012-05-16 19:54         ` chetan loke
2012-05-16 20:22           ` Matthew Wilcox
2012-05-16 20:05   ` Tim Chen

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=20120516193506.GM22985@linux.intel.com \
    --to=willy@linux.intel.com \
    --cc=ak@linux.intel.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=loke.chetan@gmail.com \
    --cc=tim.c.chen@linux.intel.com \
    /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 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.