Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: zhuzhenhua <zzh.hust@gmail.com>
Cc: linux-mips <linux-mips@linux-mips.org>
Subject: Re: is remap_pfn_range should align to 2(n) * (page size) ?
Date: Tue, 13 May 2008 18:23:01 +0100	[thread overview]
Message-ID: <20080513172300.GA9788@linux-mips.org> (raw)
In-Reply-To: <50c9a2250805130444u4218654bw66f6158ba10b2b92@mail.gmail.com>

On Tue, May 13, 2008 at 07:44:06PM +0800, zhuzhenhua wrote:

> thanks for your advice, i found in newest kernel version, in some arch , the
> dma_alloc_coherent will call split_page.
> because my kernel version is 2.6.14, so i first patch a split_page patch as
> follow:
> http://www.kernel.org/pub/linux/kernel/people/npiggin/patches/lockless/2.6.16-rc5/broken-out/mm-split-highorder.patch
> 
> but it seemes that there is still no split_page in
> dma_alloc_coherent/dma_alloc_noncoherent
> so i copy from other arch code to arch/mips/mm/dma-noncoherent.c (attach at
> the end of mail)
> and now my driver just use dma_alloc_coherent malloc 3M directly, and it
> seemes ok.
> i just wonder why mips arch dma_alloc_coherent/dma_alloc_nocoherent do not
> call split_page while other arch calling.

I have not identified the waste of memory as a big problem for typical
MIPS systems yet.

The 3MB requirement of your device is sort of odd because it's not a power
of two.  Have you considered splitting the allocation into a 2MB and a 1MB
allocation or would that be undersirable?

  Ralf

  reply	other threads:[~2008-05-13 17:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-09  6:54 is remap_pfn_range should align to 2(n) * (page size) ? zhuzhenhua
2008-05-09  9:56 ` Ralf Baechle
2008-05-12  2:18   ` zhuzhenhua
2008-05-12 11:22     ` Ralf Baechle
2008-05-13 11:44       ` zhuzhenhua
2008-05-13 17:23         ` Ralf Baechle [this message]
2008-05-14  1:19           ` zhuzhenhua
2008-05-14  7:33             ` Geert Uytterhoeven

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=20080513172300.GA9788@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=linux-mips@linux-mips.org \
    --cc=zzh.hust@gmail.com \
    /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