From: Andrea Arcangeli <andrea@suse.de>
To: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Richard Henderson <rth@twiddle.net>, linux-kernel@vger.kernel.org
Subject: Re: alpha iommu fixes
Date: Sat, 19 May 2001 15:55:02 +0200 [thread overview]
Message-ID: <20010519155502.A16482@athlon.random> (raw)
In-Reply-To: <20010518214617.A701@jurassic.park.msu.ru>
In-Reply-To: <20010518214617.A701@jurassic.park.msu.ru>; from ink@jurassic.park.msu.ru on Fri, May 18, 2001 at 09:46:17PM +0400
On Fri, May 18, 2001 at 09:46:17PM +0400, Ivan Kokshaysky wrote:
> The most interesting thing here is the pyxis "tbia" fix.
> Whee! I can now copy files from SCSI to bus-master IDE, or
> between two IDE drives on separate channels, or do other nice
> things without hanging lx/sx164. :-)
> The pyxis "tbia" turned out to be broken in a more nastier way
> than one could expect - tech details are commented in the patch.
>
> Another problem, I think, is that we need extra locking in
> pci_unmap_xx(). It seems to be possible that after the scatter-gather
> table "wraps" and some SG ptes get free, these ptes might be
> immediately allocated and next_entry pointer advanced by pci_map_xx()
> from interrupt or another CPU *before* the test for mv_pci_tbi().
> In this case we'd have stale TLB entries.
>
> Also small compile fix for 2.4.5-pre3.
>
I fixed the same race condition in the unmap (not flushed pte after
next_entry was visible) two days ago and it's ovbiosuly correct, but it
was not nearly enough here, there was a very nasty other race condition
that triggers at least on all ds10 ds20 es40 tsunami/clibber based
boards that is necessary to fix too to make the machine stable (fixed
yesterday and getting tested today).
Reading the tsunami specs I learnt 1 tlb entry caches 8 pagetables (not 1)
so the tlb flush will be invalidate immediatly by any PCI DMA run after
the flush on any of the other 7 mappings cached in the same tlb entry.
This is the fix:
diff -urN alpha-ref/arch/alpha/kernel/pci_iommu.c
alpha-works/arch/alpha/kernel/pci_iommu.c
--- alpha-ref/arch/alpha/kernel/pci_iommu.c Sun Apr 1 01:17:07 2001
+++ alpha-works/arch/alpha/kernel/pci_iommu.c Fri May 18 18:07:40 2001
@@ -69,7 +69,7 @@
/* Align allocations to a multiple of a page size. Not needed
unless there are chip bugs. */
- arena->align_entry = 1;
+ arena->align_entry = 8;
return arena;
}
@@
However thsi is just the production fix, the real fix will only change
that for the tsunami chipset
since I didn't wanted to deal with the optimizations yet I also disabled
the optimizations (I will audit the optimizations shortly). Then I fixed
at least the eppro100 driver to check if it runs of pci map entries (all
drivers out there are broken, they don't check the retval from pci_map*
etc...).
then I also enlarged the pci SG space to 1G beause runing out of entries
right now breaks the whole world:
@@ -358,7 +360,7 @@
* address range.
*/
hose->sg_isa = iommu_arena_new(hose, 0x00800000, 0x00800000, 0);
- hose->sg_pci = iommu_arena_new(hose, 0xc0000000, 0x08000000, 0);
+ hose->sg_pci = iommu_arena_new(hose, 0xc0000000, 0x40000000, 0);
__direct_map_base = 0x40000000;
__direct_map_size = 0x80000000;
diff
With all this stuff plus the same fix you posted the es40 8g runs rock
solid on top of 2.4.5pre3aa1.
I was going to wait to cleanup all those fixes but I'm posting this half
curroputed email here now just so we don't duplicate further efforts ;)
Andrea
next prev parent reply other threads:[~2001-05-19 13:55 UTC|newest]
Thread overview: 97+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-18 17:46 alpha iommu fixes Ivan Kokshaysky
2001-05-19 2:34 ` Tom Vier
2001-05-19 10:48 ` Ivan Kokshaysky
2001-05-19 20:58 ` Tom Vier
2001-05-19 13:55 ` Andrea Arcangeli [this message]
2001-05-19 19:11 ` Ivan Kokshaysky
2001-05-20 2:40 ` Andrea Arcangeli
2001-05-20 12:12 ` Ivan Kokshaysky
2001-05-20 13:40 ` Andrea Arcangeli
2001-05-20 14:23 ` Gérard Roudier
[not found] ` <3B07AF49.5A85205F@uow.edu.au>
2001-05-20 13:49 ` Andrea Arcangeli
2001-05-20 14:05 ` Andrew Morton
2001-05-20 14:33 ` Andrea Arcangeli
2001-05-21 1:01 ` David S. Miller
2001-05-21 1:47 ` Andrea Arcangeli
2001-05-21 7:05 ` David S. Miller
2001-05-21 8:59 ` Andrea Arcangeli
2001-05-21 9:02 ` David S. Miller
2001-05-21 9:23 ` Andi Kleen
2001-05-21 9:30 ` David S. Miller
2001-05-21 9:42 ` Andi Kleen
2001-05-21 10:00 ` David S. Miller
2001-05-21 10:27 ` Andi Kleen
2001-05-21 10:34 ` David S. Miller
2001-05-21 10:42 ` Andi Kleen
2001-05-21 10:55 ` David S. Miller
2001-05-21 11:08 ` Andi Kleen
2001-05-21 11:36 ` David S. Miller
2001-05-21 11:41 ` Andi Kleen
2001-05-21 22:22 ` Jens Axboe
2001-05-21 10:02 ` Andrea Arcangeli
2001-05-21 10:17 ` Alan Cox
2001-05-21 9:56 ` Andrea Arcangeli
2001-05-21 10:11 ` David S. Miller
2001-05-21 10:19 ` David S. Miller
2001-05-21 11:00 ` Andrea Arcangeli
2001-05-21 11:04 ` David S. Miller
2001-05-21 11:27 ` Andrea Arcangeli
2001-05-21 12:16 ` Peter Rival
2001-05-21 13:55 ` Jonathan Lundell
2001-05-21 14:17 ` Ivan Kokshaysky
2001-05-21 15:47 ` Jonathan Lundell
2001-05-22 11:12 ` Chris Wedgwood
2001-05-22 17:51 ` Jonathan Lundell
2001-05-21 10:50 ` Andrea Arcangeli
2001-05-21 10:59 ` David S. Miller
2001-05-21 11:19 ` Andrea Arcangeli
2001-05-21 11:51 ` Ivan Kokshaysky
2001-05-21 17:53 ` Richard Henderson
2001-05-22 0:56 ` Andrea Arcangeli
2001-05-22 14:29 ` Andrea Arcangeli
2001-05-22 14:44 ` Ivan Kokshaysky
2001-05-22 15:00 ` Andrea Arcangeli
2001-05-22 20:28 ` Richard Henderson
2001-05-22 20:40 ` Jeff Garzik
2001-05-22 20:52 ` Andrea Arcangeli
2001-05-22 20:57 ` Richard Henderson
2001-05-22 21:09 ` Alan Cox
2001-05-22 20:48 ` Jonathan Lundell
2001-05-22 21:02 ` Richard Henderson
2001-05-22 21:10 ` Alan Cox
2001-05-22 21:17 ` Jonathan Lundell
2001-05-22 21:24 ` Alan Cox
2001-05-22 21:34 ` Jonathan Lundell
2001-05-22 21:08 ` Alan Cox
2001-05-22 15:18 ` Andrea Arcangeli
2001-05-22 15:55 ` Ivan Kokshaysky
2001-05-22 16:06 ` Andrea Arcangeli
2001-05-22 13:22 ` Andrea Arcangeli
2001-05-21 9:50 ` Gerd Knorr
2001-05-21 1:00 ` David S. Miller
2001-05-21 7:47 ` Alan Cox
2001-05-21 7:53 ` David S. Miller
2001-05-21 8:03 ` Alan Cox
2001-05-21 8:11 ` David S. Miller
2001-05-20 16:18 ` Andrea Arcangeli
2001-05-20 16:21 ` Andrew Morton
2001-05-20 16:44 ` Andrea Arcangeli
2001-05-20 16:54 ` Andrew Morton
2001-05-20 17:12 ` Andrea Arcangeli
2001-05-21 1:07 ` David S. Miller
2001-05-21 1:37 ` Andrea Arcangeli
2001-05-21 6:53 ` David S. Miller
2001-05-21 7:59 ` Alan Cox
2001-05-21 8:09 ` David S. Miller
2001-05-21 8:09 ` Alan Cox
2001-05-21 8:06 ` Chris Wedgwood
2001-05-23 0:05 ` Albert D. Cahalan
2001-05-22 13:11 ` Pavel Machek
2001-05-22 23:02 ` David S. Miller
2001-05-20 17:16 ` Jeff Garzik
2001-05-20 17:37 ` Andrea Arcangeli
2001-05-21 1:03 ` David S. Miller
2001-05-21 1:58 ` Richard Henderson
2001-05-20 1:11 ` Richard Henderson
2001-05-20 12:05 ` Ivan Kokshaysky
2001-05-21 0:37 ` Richard Henderson
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=20010519155502.A16482@athlon.random \
--to=andrea@suse.de \
--cc=ink@jurassic.park.msu.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=rth@twiddle.net \
/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.