From: Pete Popov <ppopov@mvista.com>
To: Geoffrey Espin <espin@idiom.com>
Cc: James Simmons <jsimmons@transvirtual.com>,
"Gleb O. Raiko" <raiko@niisi.msk.ru>,
linux-mips <linux-mips@oss.sgi.com>
Subject: Re: kmalloc/pci_alloc and skbuff's
Date: 19 Dec 2001 11:12:25 -0800 [thread overview]
Message-ID: <1008789145.31066.140.camel@zeus> (raw)
In-Reply-To: <20011219105633.B54722@idiom.com>
On Wed, 2001-12-19 at 10:56, Geoffrey Espin wrote:
>
> > > What's wrong with GFP_DMA ? Doesn't it solve exactly this problem ?
> > Personally I don't like the hack but you have to ask what he needs.
> > kmalloc grabs memory from the CPU cache. GFP_DMA insures that cache memory
> > is continues. I think Geoffrey needs to use a specific memory address in
> > PCI space. Tho I like Geoffrey to try using GFP_DMA. The reason I don't
> > like the hack is that skbuff's is bus independent. Not all ethernet cards
> > are PCI based. Please try using GFP_DMA and let us know if it worked.
>
> Yes, I originally thought this was what addressed it.
> Is "setting dma_mask" what is meant by "using GFP_DMA"?
>
> The problem is drivers call dev_alloc_skb() which can allocate
> memory anywhere in (my 32M) memory.
>
> The PCI host controller part of the uPD98052 with its VR4120a core
> (doc at http://www.idiom.com/~espin/nec/hwdoc/uPD98502-UM.pdf)
> allows you to program a 4M window onto DRAM. I use top 4M of 32M,
> but it's arbitrary. Then only this area can be transferred to
> by/from the PCI devices. So its not the PCI devices that is the
> problem, but access to the host-side DRAM.
>
> Currently, my private pci_alloc/free_consistent() routines manage
> the 4M at top of memory (its not added to kernel with
> add_memory_region() in prom.c).
>
> With these hacks (including net/core/skbuff.c:alloc_skb->pci_alloc_consistent)
> I've been successfully using the Tulip Ethernet (LinkSys) card (with no
> changes to the driver).
FYI, this is not an isolated issue. We deal with a number of
architectures and we've seen this problem with other arches and system
controllers as well. A 'generic' solution would be nice and probably
necessary at some point. 2.5 would be a good place to do it, if only
someone would volunteer ;-)
Pete
next prev parent reply other threads:[~2001-12-19 20:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-18 20:38 kmalloc/pci_alloc and skbuff's Geoffrey Espin
2001-12-19 9:05 ` Gleb O. Raiko
2001-12-19 17:09 ` James Simmons
2001-12-19 18:56 ` Geoffrey Espin
2001-12-19 19:12 ` Pete Popov [this message]
2001-12-19 19:53 ` Geoffrey Espin
2001-12-19 21:23 ` Pete Popov
2001-12-19 21:56 ` Geoffrey Espin
2001-12-19 22:06 ` Pete Popov
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=1008789145.31066.140.camel@zeus \
--to=ppopov@mvista.com \
--cc=espin@idiom.com \
--cc=jsimmons@transvirtual.com \
--cc=linux-mips@oss.sgi.com \
--cc=raiko@niisi.msk.ru \
/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