All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Ming Lei <ming.lei@redhat.com>,
	"linux-block\@vger.kernel.org" <linux-block@vger.kernel.org>,
	"linux-nvme\@lists.infradead.org"
	<linux-nvme@lists.infradead.org>,
	Bart Van Assche <bvanassche@acm.org>
Subject: Re: Regression: NVMe: kernel BUG at lib/sg_pool.c:103!
Date: Thu, 21 Feb 2019 09:22:52 -0500	[thread overview]
Message-ID: <yq1k1hti5kz.fsf@oracle.com> (raw)
In-Reply-To: <20190221133700.GA20189@lst.de> (Christoph Hellwig's message of "Thu, 21 Feb 2019 14:37:00 +0100")


Christoph,

>> 1. We are using RQF_SPECIAL_PAYLOAD for only discard commands and not
>> for write-zeroes because it does not have any payload. Using this in
>> the code will trigger more code changes to handle in the completion
>> path.
>
> Yes.  And that is the big difference to SCSI where REQ_OP_WRITE_ZEROES
> turns into a WRITE SAME command that has a payload.  So for SCSI
> RQF_SPECIAL_PAYLOAD for REQ_OP_WRITE_ZEROES makes a lot of sense, for
> NVMe it does not.

I don't actually care about using RQF_SPECIAL, it just seemed like a
quick workaround to set it and make bv_len 0.

My concern is purely rooted in all the grief we've had throughout the
block I/O stack distinguishing between the bytes acted upon on media and
the DMA transfer length. And consequently, I don't particularly like
that blk_rq_payload_bytes() doesn't handle the NVMe WRITE ZEROES
command. That seems like something that will cause us headaches in the
future...

-- 
Martin K. Petersen	Oracle Linux Engineering

WARNING: multiple messages have this Message-ID (diff)
From: martin.petersen@oracle.com (Martin K. Petersen)
Subject: Regression: NVMe: kernel BUG at lib/sg_pool.c:103!
Date: Thu, 21 Feb 2019 09:22:52 -0500	[thread overview]
Message-ID: <yq1k1hti5kz.fsf@oracle.com> (raw)
In-Reply-To: <20190221133700.GA20189@lst.de> (Christoph Hellwig's message of "Thu, 21 Feb 2019 14:37:00 +0100")


Christoph,

>> 1. We are using RQF_SPECIAL_PAYLOAD for only discard commands and not
>> for write-zeroes because it does not have any payload. Using this in
>> the code will trigger more code changes to handle in the completion
>> path.
>
> Yes.  And that is the big difference to SCSI where REQ_OP_WRITE_ZEROES
> turns into a WRITE SAME command that has a payload.  So for SCSI
> RQF_SPECIAL_PAYLOAD for REQ_OP_WRITE_ZEROES makes a lot of sense, for
> NVMe it does not.

I don't actually care about using RQF_SPECIAL, it just seemed like a
quick workaround to set it and make bv_len 0.

My concern is purely rooted in all the grief we've had throughout the
block I/O stack distinguishing between the bytes acted upon on media and
the DMA transfer length. And consequently, I don't particularly like
that blk_rq_payload_bytes() doesn't handle the NVMe WRITE ZEROES
command. That seems like something that will cause us headaches in the
future...

-- 
Martin K. Petersen	Oracle Linux Engineering

  reply	other threads:[~2019-02-21 14:23 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-20  3:11 Regression: NVMe: kernel BUG at lib/sg_pool.c:103! Ming Lei
2019-02-20  3:11 ` Ming Lei
2019-02-20  3:13 ` Ming Lei
2019-02-20  3:13   ` Ming Lei
2019-02-20 14:17 ` Christoph Hellwig
2019-02-20 14:17   ` Christoph Hellwig
2019-02-20 16:59   ` Chaitanya Kulkarni
2019-02-20 16:59     ` Chaitanya Kulkarni
2019-02-20 18:16   ` Chaitanya Kulkarni
2019-02-20 18:16     ` Chaitanya Kulkarni
2019-02-20 22:55     ` Martin K. Petersen
2019-02-20 22:55       ` Martin K. Petersen
2019-02-21  1:29       ` Chaitanya Kulkarni
2019-02-21  1:29         ` Chaitanya Kulkarni
2019-02-21 13:37         ` Christoph Hellwig
2019-02-21 13:37           ` Christoph Hellwig
2019-02-21 14:22           ` Martin K. Petersen [this message]
2019-02-21 14:22             ` Martin K. Petersen
2019-02-21  2:16     ` Ming Lei
2019-02-21  2:16       ` Ming Lei
2019-02-21  2:21       ` Chaitanya Kulkarni
2019-02-21  2:21         ` Chaitanya Kulkarni

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=yq1k1hti5kz.fsf@oracle.com \
    --to=martin.petersen@oracle.com \
    --cc=Chaitanya.Kulkarni@wdc.com \
    --cc=bvanassche@acm.org \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=ming.lei@redhat.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.