public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Grant Grundler <iod00d@hp.com>
To: linux-ia64@vger.kernel.org
Subject: Re: SCSI ERRORS triggered by BIO_VMERGE_BOUNDARY
Date: Mon, 23 Jun 2003 07:11:19 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105635245808996@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105604433402604@msgid-missing>

On Thu, Jun 19, 2003 at 10:36:34AM -0700, David Mosberger wrote:
> If I set BIO_VMERGE_BOUNDARY to 0, the errors disappear.

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

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


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

I'd think that ia64 wants:

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

(If I've accounted for tildes properly.)

It looks like a few other arches do something like that:
./include/asm-ppc64/io.h:#define BIO_VMERGE_BOUNDARY    4096
./include/asm-sparc64/io.h:#define BIO_VMERGE_BOUNDARY  8192

(BTW, PARISC probably wants to use 4K pages as well).


> My suspicion is that something is wrong in the sba_iommu.c code
> with respect to block merging.

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

hth,
grant

  parent reply	other threads:[~2003-06-23  7:11 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 [this message]
2003-06-23 15:04 ` Alex Williamson
2003-06-23 16:52 ` David Mosberger
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-105635245808996@msgid-missing \
    --to=iod00d@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