All of lore.kernel.org
 help / color / mirror / Atom feed
From: hch@lst.de (Christoph Hellwig)
Subject: [PATCH 1/2] nvme: introduce struct nvme_request
Date: Thu, 27 Oct 2016 14:30:27 +0200	[thread overview]
Message-ID: <20161027123027.GB12867@lst.de> (raw)
In-Reply-To: <5293ea38-f0ee-f0a0-9469-537444aab0db@grimberg.me>

On Thu, Oct 27, 2016@12:24:24PM +0300, Sagi Grimberg wrote:
>> +struct nvme_request {
>> +	struct nvme_command	*cmd;
>> +	union nvme_result	result;
>> +};
>
> I sorta agree with James, can we not enforce a "hidden assumption"
> of the core on how the transport drivers structures are built?

We have to, as this is the structure passed between the core and the
the drivers. 

>> +static inline struct nvme_request *nvme_req(struct request *req)
>> +{
>> +	return blk_mq_rq_to_pdu(req);
>> +}
>
> Maybe this can be a ctrl->ops->nvme_req() instead?

Why add indirections if we can avoid it?  Especially if we're ever
going to use the passthrough in a performance path (e.g. the target)
these indirect calls just to get an address will hurt us.

And it's not like requiring a common structure at the beginning is
unusual - this is how every Linux fs treats the inode structure.

  reply	other threads:[~2016-10-27 12:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-25 16:09 rework NVMe command passthrough Christoph Hellwig
2016-10-25 16:09 ` [PATCH 1/2] nvme: introduce struct nvme_request Christoph Hellwig
2016-10-26 18:05   ` James Smart
     [not found]     ` <2aa1235b-8dae-3399-7d7b-2ebed8ad53c5@broadcom.com>
     [not found]       ` <98e72062-abb2-e596-cbdd-d6f915f8ba4d@broadcom.com>
2016-10-27  7:16         ` Christoph Hellwig
2016-10-27  9:24   ` Sagi Grimberg
2016-10-27 12:30     ` Christoph Hellwig [this message]
2016-10-25 16:09 ` [PATCH 2/2] nvme: don't pass the full CQE to nvme_complete_async_event Christoph Hellwig
2016-10-25 16:53   ` Christoph Hellwig
2016-11-09 19:39 ` rework NVMe command passthrough Christoph Hellwig
2016-11-09 20:00   ` Keith Busch
2016-11-09 21:45     ` Christoph Hellwig
2016-11-09 20:54   ` Jens Axboe
2016-11-10 15:32 rework NVMe command passthrough V2 Christoph Hellwig
2016-11-10 15:32 ` [PATCH 1/2] nvme: introduce struct nvme_request Christoph Hellwig

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=20161027123027.GB12867@lst.de \
    --to=hch@lst.de \
    /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.