public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: David Mosberger <davidm@napali.hpl.hp.com>
To: linux-ia64@vger.kernel.org
Subject: Re: SCSI ERRORS triggered by BIO_VMERGE_BOUNDARY
Date: Mon, 23 Jun 2003 16:52:06 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105638713909251@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105604433402604@msgid-missing>

>>>>> On Mon, 23 Jun 2003 00:11:19 -0700, Grant Grundler <iod00d@hp.com> said:

  Grant> Hmm...convoluted code.  ./arch/ia64/kernel/setup.c:unsigned
  Grant> long ia64_max_iommu_merge_mask = ~0UL;

  Grant> arch/ia64/hp/common/sba_iommu.c: #define IOVP_MASK PAGE_MASK
  Grant> ...  if ((long) ~IOVP_MASK > (long)
  Grant> ia64_max_iommu_merge_mask) ia64_max_iommu_merge_mask   Grant> ~IOVP_MASK;

  Grant> AFAICT, that's the equivalent to (PAGE_SIZE-1) > (-1) on the
  Grant> first round.  Or did I missed a tilde?

No, that's what it is.

  Grant> I'd think that ia64 wants:

  Grant> 	#define BIO_VMERGE_BOUNDARY (~ia64_max_iommu_merge_mask + 1)
  Grant>     or #define BIO_VMERGE_BOUNDARY PAGE_SIZE

No, BIO_VMERGE_BOUNDARY must be 0xffffffffffffffff if there is no
hardware I/O MMU present (i.e., the I/O MMU page size is 2^64) and
PAGE_SIZE if an I/O MMU is present (which can support PAGE_SIZE
pages).

  Grant> It's easy to get the block merging code wrong when merging
  Grant> random chunks which can be bigger or smaller than
  Grant> PAGE_SIZE. My gut feeling this can all get ripped out of 2.5
  Grant> sba_iommu.c if the bio code is going to merge for us. That
  Grant> means pci_map_sg() support only needs to map each address/len
  Grant> pair and forget trying to merge them.

No, you got this backwards: the bio-level code _assumes_ that
discontiguous physical pages can be remapped linearly by the I/O MMU
code.  If the I/O MMU code doesn't actually do the merging, the kernel
will fall flat on its face.

	--david

  parent reply	other threads:[~2003-06-23 16:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-19 17:36 SCSI ERRORS triggered by BIO_VMERGE_BOUNDARY David Mosberger
2003-06-19 20:48 ` Jesse Barnes
2003-06-19 21:47 ` Grant Grundler
2003-06-23  7:11 ` Grant Grundler
2003-06-23 15:04 ` Alex Williamson
2003-06-23 16:52 ` David Mosberger [this message]
2003-06-23 20:24 ` Grant Grundler
2003-06-23 20:41 ` David Mosberger
2003-06-23 22:05 ` Grant Grundler
2003-06-23 22:14 ` David Mosberger
2003-06-24 21:07 ` Grant Grundler

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=marc-linux-ia64-105638713909251@msgid-missing \
    --to=davidm@napali.hpl.hp.com \
    --cc=linux-ia64@vger.kernel.org \
    /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