All of lore.kernel.org
 help / color / mirror / Atom feed
From: Niklas Cassel <cassel@kernel.org>
To: Damien Le Moal <dlemoal@kernel.org>
Cc: Yu Kuai <yukuai1@huaweicloud.com>,
	yangxingui <yangxingui@huawei.com>,
	axboe@kernel.dk, John Garry <john.g.garry@oracle.com>,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	James.Bottomley@hansenpartnership.com,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	"yukuai (C)" <yukuai3@huawei.com>,
	"yangerkun@huawei.com" <yangerkun@huawei.com>
Subject: Re: [bug report] block: Non-NCQ commands will never be executed while fio is continuously running
Date: Thu, 31 Oct 2024 15:12:43 +0100	[thread overview]
Message-ID: <ZyOQWyyai2JkKyzy@ryzen> (raw)
In-Reply-To: <e1ff5ccc-8204-44d8-ba62-84c8bd204fa0@kernel.org>

On Thu, Sep 19, 2024 at 04:14:15PM +0200, Damien Le Moal wrote:
> On 2024/09/19 14:26, Yu Kuai wrote:
> > 
> > Does libata return a specific value in this case? If so, maybe we can
> > stop other hctx untill this IO is handled.
> > 
> > For now, I think libata should use single hctx, it just doesn't support
> > multiple hctx yet.
> 
> libata does not care/know about hctx. It only issues commands to ATA devices,
> which always are single queue. And pure SATA adapters like AHCI are always
> single queue.
> 
> The issue at hand can happen only for libsas based SAS HBAs that have multiple
> command submission queues (with a shared tag set). Commands for the same device
> may end up being submitted through different queues, and when the submitted
> commands include a mix of NCQ and non-NCQ commands, the problem happens without
> libata being able to easily do anything about it, and not possible control
> possible at the scsi layer either since the commands submitted are SCSI (not yet
> translated to ATA commands) which do not have any NCQ/non-NCQ exclusion
> knowledge at all. NCQ is an ATA concept unknown to the scsi and block layer.
> 
> We (Niklas and I) are trying to find a solution, but that may not be within
> libata itself. It may need changes to libsas as well. Not sure yet. Still exploring.

Hello Xingui,

I send a proposed solution to this problem here:
https://lore.kernel.org/linux-ide/20241031140731.224589-4-cassel@kernel.org/

Please test and see if it addresses your problem.


Kind regards,
Niklas

  reply	other threads:[~2024-10-31 14:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-09 13:10 [bug report] block: Non-NCQ commands will never be executed while fio is continuously running yangxingui
2024-09-09 13:21 ` Damien Le Moal
2024-09-10  1:09   ` yangxingui
2024-09-10  4:45     ` Damien Le Moal
2024-09-10  6:34       ` yangxingui
2024-09-10 11:27         ` Niklas Cassel
2024-09-10 22:38           ` Damien Le Moal
2024-09-11  9:41             ` yangxingui
2024-09-19 12:26             ` Yu Kuai
2024-09-19 14:14               ` Damien Le Moal
2024-10-31 14:12                 ` Niklas Cassel [this message]
2024-11-01  2:17                   ` yangxingui

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=ZyOQWyyai2JkKyzy@ryzen \
    --to=cassel@kernel.org \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=axboe@kernel.dk \
    --cc=dlemoal@kernel.org \
    --cc=john.g.garry@oracle.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=yangerkun@huawei.com \
    --cc=yangxingui@huawei.com \
    --cc=yukuai1@huaweicloud.com \
    --cc=yukuai3@huawei.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.