public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind@infradead.org>
To: David Brownell <david-b@pacbell.net>
Cc: linux-mtd@lists.infradead.org, trimarchimichael@yahoo.it,
	jwboyer@gmail.com, dwmw2@infradead.org,
	akpm@linux-foundation.org, rmk@arm.linux.org.uk
Subject: Re: [patch 02/13] jffs2 summary allocation: don't use vmalloc()
Date: Thu, 31 Jul 2008 08:15:15 +0300	[thread overview]
Message-ID: <1217481315.9048.64.camel@sauron> (raw)
In-Reply-To: <20080730223924.3C51136129C@adsl-69-226-248-13.dsl.pltn13.pacbell.net>

Hi,

On Wed, 2008-07-30 at 15:39 -0700, David Brownell wrote:
> > This patch will probably break all sorts of things because that buffer is
> > &*large*: up to half a meg.
> >
> > So this patch isn't mergeable.  I'll hang onto it to bug dmwm2 with when he
> > reincarnates.
> 
> I'm still asking whether MTD folk have any plans to make that stack DMA-safe...
> more than just the SPI flash drivers (mtd_dataflash, m25p80) could benefit
> from DMA support, so I'd hope it's at least being considered.
> 
> If the answer is "no" then (a) the MTD interface specs need to finally say
> they pass DMA-unsafe addresses, and (b) those SPI flash drivers are going
> to need updates.

We use vmalloc() in both UBI and UBIFS because we need to allocate a
large (of eraseblock size) buffer. So this is not just JFFS2. Using
kmalloc() for this does not seem to be a good idea for me, because
indeed the buffer size may be up to 512KiB, and may even grow at some
point to 1MiB.

Using kmalloc() would mean that at some point we would be unable to
allocate these buffers at one go and would have to do things is
fractions smaller than eraseblock size, which is not always easy. So I
am not really sure what is better - to add complexity to JFFS2/UBI/UBIFS
or to teach low levels (which do DMA) to deal with physically
noncontinuous buffers (e.g., DMA only one RAM page at a time).

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)

  parent reply	other threads:[~2008-07-31  5:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-30 19:34 [patch 02/13] jffs2 summary allocation: don't use vmalloc() akpm
2008-07-30 22:39 ` David Brownell
2008-07-30 22:46   ` Andrew Morton
2008-07-31  5:10     ` David Brownell
2008-07-31  5:37       ` Artem Bityutskiy
2008-07-31  6:57         ` David Brownell
2008-07-31  8:03           ` Artem Bityutskiy
2008-07-31  5:15   ` Artem Bityutskiy [this message]
2008-07-31  6:56     ` David Brownell
2008-07-31  8:00       ` Artem Bityutskiy
2008-07-31  8:48         ` David Woodhouse
2008-07-31  9:09           ` David Woodhouse
2008-07-31  7:33   ` David Woodhouse
2008-07-31  8:21     ` 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=1217481315.9048.64.camel@sauron \
    --to=dedekind@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=david-b@pacbell.net \
    --cc=dwmw2@infradead.org \
    --cc=jwboyer@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=rmk@arm.linux.org.uk \
    --cc=trimarchimichael@yahoo.it \
    /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