All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@fb.com>, Kevin Hao <haokexin@gmail.com>,
	Sagi Grimberg <sagi@grimberg.me>,
	linux-nvme@lists.infradead.org
Subject: Re: [PATCH] nvme-pci: Set the prp2 correctly when using more than 4k page
Date: Thu, 17 Oct 2019 11:38:07 -0600	[thread overview]
Message-ID: <20191017173807.GA91017@C02WT3WMHTD6> (raw)
In-Reply-To: <20191017145554.GA8676@lst.de>

On 10/17/19, 1:40 AM, "Kevin Hao" <haokexin@gmail.com> wrote:
> +	unsigned int offset = bv->bv_offset % dev->ctrl.page_size;

Can we do this without the modulo in the io path? The page_size is a power of
2, so this should work:

	unsigned int offset = bv->bv_offset & (dev->ctrl.page_size - 1);

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

  reply	other threads:[~2019-10-17 17:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-17  7:34 [PATCH] nvme-pci: Set the prp2 correctly when using more than 4k page Kevin Hao
2019-10-17 14:55 ` Christoph Hellwig
2019-10-17 17:38   ` Keith Busch [this message]
2019-10-18  0:59     ` Kevin Hao
2019-10-18  2:53       ` [PATCH v2] " Kevin Hao
2019-10-18  6:48         ` Christoph Hellwig
2019-10-18 14:10           ` Keith Busch

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=20191017173807.GA91017@C02WT3WMHTD6 \
    --to=kbusch@kernel.org \
    --cc=axboe@fb.com \
    --cc=haokexin@gmail.com \
    --cc=hch@lst.de \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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.