linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Christoph Hellwig <hch@infradead.org>,
	Sven Peter <sven@svenpeter.dev>,
	linux-nvme@lists.infradead.org
Subject: Re: [asahilinux:nvme/dev 13/17] drivers/nvme/host/pci.c:2249:2-3: Unneeded semicolon
Date: Mon, 9 Aug 2021 15:29:16 +0100	[thread overview]
Message-ID: <YRE7vCyn9d1ClhRm@infradead.org> (raw)
In-Reply-To: <CAK8P3a2t8qAr1q6uf-wuer6rpZnmOmZ1LytO6vOGXKT1DR2OmA@mail.gmail.com>

On Mon, Aug 09, 2021 at 12:02:55PM +0200, Arnd Bergmann wrote:
> Do you have any further suggestions? Should we just duplicate
> the driver and then simplify the platform version as much as possible
> as you suggested above, or try to share some of the code according
> to my original plan?

Yes, please duplicate it.  The tradeoff between absolute performance
requirements and various bits of broken consumer hardware already
is hard enough as-is that we don't need to support apples frankenchip
in the same codebase.

Note that I suspect you can probably drop a whole lot of the duplicate
code for the apple driver.  I doubt it supports things like CMB, HMB
T10 protection information, shadow doorbells, SGLs, etc.

Also given that it only supports a single I/O queue there is no need
to support read queues or poll queues or any kind of queue mapping.

Also can one of you look how PRPs are actually used by MacOS?  Given
that this device always seems to be behind a IOMMU creating one entry
per page seems rather weird given that the apple_nvmmu_tcb structure
already contains the full length.  Maybe it actually ignores all but
the first PRP?

So yes, duplicating the driver will probably look a little worse
from a pure LOC, but it will be much easier to maintain and to
understand.

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

  reply	other threads:[~2021-08-09 14:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <202108051646.vdMMUBea-lkp@intel.com>
     [not found] ` <YQ7GVu1TqpqbHZOb@infradead.org>
2021-08-09 10:02   ` [asahilinux:nvme/dev 13/17] drivers/nvme/host/pci.c:2249:2-3: Unneeded semicolon Arnd Bergmann
2021-08-09 14:29     ` Christoph Hellwig [this message]
2021-08-09 15:53       ` Arnd Bergmann
2021-08-09 20:11         ` Sven Peter
2021-08-18  6:26           ` Sven Peter

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=YRE7vCyn9d1ClhRm@infradead.org \
    --to=hch@infradead.org \
    --cc=arnd@arndb.de \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sven@svenpeter.dev \
    /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;
as well as URLs for NNTP newsgroup(s).