public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: john smith <whalajam@yahoo.com>
To: Matthew Wilcox <matthew@wil.cx>,
	James Bottomley <James.Bottomley@suse.de>
Cc: linux-scsi@vger.kernel.org
Subject: Re: scsi_host_template.queuecommand() instances
Date: Tue, 8 Mar 2011 10:22:19 -0800 (PST)	[thread overview]
Message-ID: <149126.21460.qm@web161909.mail.bf1.yahoo.com> (raw)
In-Reply-To: <1298902479.2487.9.camel@mulgrave.site>

> What actually governs the threading is the ioscheduler
> entry context to
> the request function, which tends to be governed by how the
> I/O is
> called at the top.
> 
> James

Considering the IO scheduler and the IO merges: I can imagine how it works if all the concurrent IO's for the same device are scheduled and merged and re-issued by another thread - that is the scheduler theread.

But how the two activities are accomplished such that IO's are still issued by their original threads?
For ex., IO_1 is issued by thread1 and IO_2 issued by thread2; they are merged/re-ordered and IO_2 is merged with IO_1 in one single IO (IO_2, IO_1); 
which thread is issueing the single, but larger IO? 
what is the other thread doing if there are no/fewer IO's left to issue?
Some IO's are issued on behalf of an other IO thread context?
It is even uglier for scheduling (which may involve interlacing IO's from different threads), is the scheduler lock-stepping the IO threads to enforce the sequence?

I doubt it this is the way it is implemented and I'd like to understand how is it done.
It would be more efficient that all IO's for a particular device are handled by one (queue and) thread

thanks,
John


      

  reply	other threads:[~2011-03-08 18:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-27 19:22 scsi_host_template.queuecommand() instances john smith
2011-02-27 22:21 ` Matthew Wilcox
2011-02-28  7:21   ` john smith
2011-02-28 13:24     ` Matthew Wilcox
2011-02-28 14:14       ` James Bottomley
2011-03-08 18:22         ` john smith [this message]
2011-03-04 20:58       ` john smith

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=149126.21460.qm@web161909.mail.bf1.yahoo.com \
    --to=whalajam@yahoo.com \
    --cc=James.Bottomley@suse.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=matthew@wil.cx \
    /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