All of lore.kernel.org
 help / color / mirror / Atom feed
From: willy@linux.intel.com (Matthew Wilcox)
Subject: Alignment Issue with Direct IO to NVMe Drive
Date: Tue, 27 Nov 2012 16:39:43 -0500	[thread overview]
Message-ID: <20121127213943.GB5100@linux.intel.com> (raw)
In-Reply-To: <CAMi7pMb7Ln02hLfa_i-7ucWZBDGzQLUOoQTeFp70=yGix_gojA@mail.gmail.com>

On Tue, Nov 27, 2012@09:47:48AM -0800, Laine Walker-Avina wrote:
> On Tue, Nov 27, 2012@9:05 AM, Matthew Wilcox <willy@linux.intel.com> wrote:
> > Laine, when this occurs, what is the alignment of 'offset' in the sg
> > entry you're looking at?  If userspace is passing in an unaligned address,
> > I don't think there's anything we do to try to align it.
> 
> I thought this was the case as well, but it appears to be aligned
> looking at the request in the user space program (fio using libaio in
> this case) before the IO is submitted.

OK, so we have an aligned virtual address being translated into an
unaligned DMA address.  I have a suspicion ... are you using the swiotlb,
or are you using a real IOMMU?  Grep dmesg for 'IOMMU' if you're not sure.

WARNING: multiple messages have this Message-ID (diff)
From: Matthew Wilcox <willy@linux.intel.com>
To: Laine Walker-Avina <lwalkera@ieee.org>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
	lwalkera@micron.com
Subject: Re: Alignment Issue with Direct IO to NVMe Drive
Date: Tue, 27 Nov 2012 16:39:43 -0500	[thread overview]
Message-ID: <20121127213943.GB5100@linux.intel.com> (raw)
In-Reply-To: <CAMi7pMb7Ln02hLfa_i-7ucWZBDGzQLUOoQTeFp70=yGix_gojA@mail.gmail.com>

On Tue, Nov 27, 2012 at 09:47:48AM -0800, Laine Walker-Avina wrote:
> On Tue, Nov 27, 2012 at 9:05 AM, Matthew Wilcox <willy@linux.intel.com> wrote:
> > Laine, when this occurs, what is the alignment of 'offset' in the sg
> > entry you're looking at?  If userspace is passing in an unaligned address,
> > I don't think there's anything we do to try to align it.
> 
> I thought this was the case as well, but it appears to be aligned
> looking at the request in the user space program (fio using libaio in
> this case) before the IO is submitted.

OK, so we have an aligned virtual address being translated into an
unaligned DMA address.  I have a suspicion ... are you using the swiotlb,
or are you using a real IOMMU?  Grep dmesg for 'IOMMU' if you're not sure.

  reply	other threads:[~2012-11-27 21:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-27  0:35 Alignment Issue with Direct IO to NVMe Drive Laine Walker-Avina
2012-11-27  0:35 ` Laine Walker-Avina
2012-11-27 12:09 ` Jens Axboe
2012-11-27 12:09   ` Jens Axboe
2012-11-27 17:05   ` Matthew Wilcox
2012-11-27 17:05     ` Matthew Wilcox
2012-11-27 17:47     ` Laine Walker-Avina
2012-11-27 17:47       ` Laine Walker-Avina
2012-11-27 21:39       ` Matthew Wilcox [this message]
2012-11-27 21:39         ` Matthew Wilcox
2012-11-27 22:25         ` Laine Walker-Avina
2012-11-27 22:25           ` Laine Walker-Avina
2012-11-27 17:43   ` Laine Walker-Avina
2012-11-27 17:43     ` Laine Walker-Avina

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=20121127213943.GB5100@linux.intel.com \
    --to=willy@linux.intel.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.