public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Boaz Harrosh <bharrosh@panasas.com>
To: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: James.Bottomley@HansenPartnership.com, jens.axboe@oracle.com,
	dougg@torque.net, linux-scsi@vger.kernel.org,
	osd-dev@open-osd.org
Subject: Re: [PATCH] bsg: Add support for submitting requests at tail of	queue
Date: Sun, 25 Jan 2009 11:17:30 +0200	[thread overview]
Message-ID: <497C2E2A.1070809@panasas.com> (raw)
In-Reply-To: <20090123151408G.fujita.tomonori@lab.ntt.co.jp>

FUJITA Tomonori wrote:
> On Thu, 22 Jan 2009 16:27:59 -0600
> James Bottomley <James.Bottomley@HansenPartnership.com> wrote:
> 
>> On Fri, 2009-01-23 at 07:03 +0900, FUJITA Tomonori wrote: 
>>> So, Boaz, what do you want to do exactly? It should have in the patch
>>> description. I don't want to add something that nobody uses.
>> OK, can we step back a bit from this?  Everyone seems to be talking past
>> each other.  The original complaint was that multiple commands against
>> the same device issued by SG_IO could be executed "out of order".  This
>> is really irrelevant because we never guarantee execution order in the
>> first place.

out-of-order execution happens very rarely and I can live with that,
as long as statistically, over an iscsi connection, they are submitted
in order, then there are optimizations that can take advantage of this.
(Actually I have never observed an out of order submission to a target)

>>
>> However, if you consider our current at head insertion policy coupled
>> with a multi-threaded application issuing hundreds of SG_IO requests at
>> once, you can see we have a potential starvation issue:  Commands at the
>> tail of the queue end up pushed further and further back as more
>> commands are added to the head.  This starvation issue is worth
>> addressing, I think, and it can only be addressed by allowing tail
>> insertion.
> 
> Ah, I see. Thanks. We could see this with something busy.

That was my point. Submitting when queues are full.

> 
> BTW, bsg write interface enables you to send a command asynchronously
> so a single-thread-ed application could cause this.

However ...

The patch I submitted is not good enough. I have only added control for
the write/read path, Not the SG_IO path. The last one was left at_tail,
as before. But this is very bad, we should absolutely keep both interfaces
the same, as much as we can.

Now here we have a problem. write/read was default "at_head" SG_IO was default
"at_tail". If we want to absolutely keep backward compatibility with old
applications we need two bits. One - BSG_FLAG_Q_AT_TAIL but another one
BSG_FLAG_Q_FLAG_VALID.

In the light that I found a bad bug with SG_IO just recently, and for a fact
I know that Pete and all his osd guys only used the write/read method. I would
say that SG_IO applications are very rare, and could be disregarded.

TOMO, Jens, Please decide what you want to do. I'll post as reply to first patch
the one-bit-clean version. If you decide I will be happy to send a two-bit-compatible
version ASAP.

Thanks
Boaz
 

  reply	other threads:[~2009-01-25  9:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-21  9:52 [PATCH] bsg: Add support for submitting requests at tail of queue Boaz Harrosh
2009-01-21 23:24 ` FUJITA Tomonori
2009-01-22  8:57   ` Boaz Harrosh
2009-01-22 11:13   ` Jens Axboe
2009-01-22 12:44     ` Boaz Harrosh
2009-01-22 12:46       ` Jens Axboe
2009-01-22 22:03         ` FUJITA Tomonori
2009-01-22 22:27           ` James Bottomley
2009-01-23  6:14             ` FUJITA Tomonori
2009-01-25  9:17               ` Boaz Harrosh [this message]
2009-01-25  9:41 ` [PATCH version2] " Boaz Harrosh
2009-01-25  9:44   ` Boaz Harrosh
2009-01-25 10:07 ` [PATCH version 3] " Boaz Harrosh

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=497C2E2A.1070809@panasas.com \
    --to=bharrosh@panasas.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=dougg@torque.net \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=jens.axboe@oracle.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=osd-dev@open-osd.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