Linux PARISC architecture development
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: James Bottomley <James.Bottomley@steeleye.com>,
	"Joel Soete" <soete.joel@tiscali.be>
Cc: parisc-linux@lists.parisc-linux.org, Matthew Wilcox <matthew@wil.cx>
Subject: Re: [parisc-linux] Strange newest LAB msg?
Date: Sun, 2 Apr 2006 11:29:30 +0200	[thread overview]
Message-ID: <200604021129.31095.deller@gmx.de> (raw)
In-Reply-To: <1143901853.3368.0.camel@mulgrave.il.steeleye.com>

[-- Attachment #1: Type: text/plain, Size: 1514 bytes --]

On Saturday 01 April 2006 16:30, James Bottomley wrote:
> On Sat, 2006-04-01 at 09:35 +0200, Helge Deller wrote:
> > I'm pretty sure.
> > We never vmalloc'ed IOmem before.
> 
> Where are you taking the ioremap virtual range from?  If it's the
> vmalloc range, which is the only one I can think we have available for
> arbitrary kernel mappings, then that would explain the behaviour.

Correct.
ioremap() calls get_vm_area(), which in turn gets it from __get_vm_area(size, flags, VMALLOC_START, VMALLOC_END);
VMALLOC_START seems to be at 32KB, while VMALLOC_END at around 240MB.
This means we have ~240MB of IO-Space which seems to little for the N4k.

Willy said in another mail:
> Either we're leaking vmalloc space, we allocate too much of it, or we
> need to drastically increase it the amount of it we have available.

I think Willy is right.
We probably don't leak in ioremap(), since we use the standard Linux kernel functions.
I would propose to analyze how much the 14 PCI busses wants to allocate, and if they free it correctly and if they might leak.

Might this be the culprit: 
(lba_pci.c:1216)
case PAT_PIOP:
                        /*
                        ** Postable I/O port space is per PCI host adapter.
                        ** base of 64MB PIOP region
                        */
                        lba_dev->iop_base = ioremap_nocache(p->start, 64 * 1024 * 1024);
It allocates 64MB in a loop.

Joel, can you apply the attached patch and send us the bootlog of the N4k with it ?

Helge

[-- Attachment #2: t --]
[-- Type: text/plain, Size: 709 bytes --]

Index: ioremap.c
===================================================================
RCS file: /var/cvs/linux-2.6/arch/parisc/mm/ioremap.c,v
retrieving revision 1.16
diff -u -p -r1.16 ioremap.c
--- ioremap.c	29 Mar 2006 22:18:32 -0000	1.16
+++ ioremap.c	2 Apr 2006 09:27:59 -0000
@@ -181,6 +181,9 @@ void __iomem * __ioremap(unsigned long p
 	phys_addr &= PAGE_MASK;
 	size = PAGE_ALIGN(last_addr) - phys_addr;
 
+
+	printk("IOREMAP: phys=%lx, size=%lx\n", phys_addr, size);
+
 	/*
 	 * Ok, go for it..
 	 */
@@ -193,6 +196,8 @@ void __iomem * __ioremap(unsigned long p
 		vfree(addr);
 		return NULL;
 	}
+
+	printk("IOREMAP: remapped to %p\n", addr);
 
 	return (void __iomem *) (offset + (char *)addr);
 }

[-- Attachment #3: Type: text/plain, Size: 169 bytes --]

_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

  reply	other threads:[~2006-04-02  9:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-31 15:26 [parisc-linux] Strange newest LAB msg? Joel Soete
2006-03-31 15:54 ` Matthew Wilcox
2006-04-01  7:02   ` Grant Grundler
2006-04-01  7:35     ` Helge Deller
2006-04-01 14:30       ` James Bottomley
2006-04-02  9:29         ` Helge Deller [this message]
2006-04-02 11:18           ` Joel Soete
2006-04-02 13:15             ` Helge Deller
2006-04-02 14:29               ` Joel Soete
2006-04-03  1:28               ` Grant Grundler
2006-04-03  2:02                 ` Matthew Wilcox
2006-04-04 12:05                 ` James Bottomley
2006-04-05  6:50                   ` Helge Deller
2006-04-06  0:02                     ` James Bottomley
  -- strict thread matches above, loose matches on Subject: below --
2006-04-03 13:20 Joel Soete
2006-04-05 16:43 Joel Soete
2006-04-05 17:02 ` Helge Deller

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=200604021129.31095.deller@gmx.de \
    --to=deller@gmx.de \
    --cc=James.Bottomley@steeleye.com \
    --cc=matthew@wil.cx \
    --cc=parisc-linux@lists.parisc-linux.org \
    --cc=soete.joel@tiscali.be \
    /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