public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Anton Blanchard <anton@samba.org>,
	Jeff Garzik <jgarzik@pobox.com>,
	linux-kernel@vger.kernel.org
Subject: Re: pci_set_mwi() ... why isn't it used more?
Date: Thu, 30 Jan 2003 10:35:25 -0800	[thread overview]
Message-ID: <3E39706D.6080400@pacbell.net> (raw)
In-Reply-To: 20030130195944.A4966@jurassic.park.msu.ru

Ivan Kokshaysky wrote:
> 
> Hmm, what happens if you boot the kernel configured for 80386
> on P4 and enable MWI?

Which answer is better?

  - It works safely:  pci cache line size not less than the real one.

  - There's I/O-pattern dependant breakage caused by that config goof.

I think the first answer is better, but it looks like 2.5.59 will
set the pci cache line size to 16 bytes not 128 bytes in that case.

The generic pci code to set cacheline size uses SMP_CACHE_BYTES,
which is usually L1_CACHE_BYTES ... and looks incorrect at least on
non-SMP ia64.  Only sparc64 seems to have non-generic code to set
the line size but it's done for all devices, as they're probed.

Maybe i386 should HAVE_ARCH_PCI_MWI, smart enough to use the actual
CPU's cache line size (boot code saves that, yes?) and maybe even
check for that particular class of breakage Anton mentioned.

Another option would be to do like SPARC64 and set the cacheline
sizes as part of DMA enable (which is what I'd first thought of).
And have the breakage test in the ARCH_PCI_MWI code -- something
that sparc64 doesn't do, fwiw.

- Dave





  reply	other threads:[~2003-01-30 18:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-20 18:41 pci_set_mwi() ... why isn't it used more? David Brownell
2003-01-20 19:00 ` Jeff Garzik
2003-01-20 19:37   ` David Brownell
2003-01-30 13:52     ` Anton Blanchard
2003-01-30 16:25       ` David Brownell
2003-01-30 16:59         ` Ivan Kokshaysky
2003-01-30 18:35           ` David Brownell [this message]
2003-01-30 23:34             ` Ivan Kokshaysky
2003-01-31  0:11               ` Jeff Garzik
2003-01-31  0:51               ` David Brownell

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=3E39706D.6080400@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=anton@samba.org \
    --cc=ink@jurassic.park.msu.ru \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@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