From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Artem Bityutskiy <dedekind1@gmail.com>
Cc: Richard Weinberger <richard@nod.at>,
Joe Perches <joe@perches.com>,
Marek Vasut <marek.vasut@gmail.com>,
Pan Bian <bianpan201604@163.com>,
David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>,
Cyrille Pitchen <cyrille.pitchen@atmel.com>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
Pan Bian <bianpan2016@163.com>
Subject: Re: [PATCH 1/1] mtd: ubi: fix improper return value
Date: Mon, 5 Dec 2016 09:23:40 +0100 [thread overview]
Message-ID: <20161205092340.6c119305@bbrezillon> (raw)
In-Reply-To: <1480921774.2583.351.camel@gmail.com>
On Mon, 05 Dec 2016 09:09:34 +0200
Artem Bityutskiy <dedekind1@gmail.com> wrote:
> On Sun, 2016-12-04 at 21:52 +0100, Richard Weinberger wrote:
> > We should better think about how to get ubi_self_check_all_ff()
> > fixed.
> > When enabled on a modern NAND, vmalloc() is likely to fail now and
> > then
> > since len is the erase block size and can be up to a few mega bytes.
>
> I did an attempt to switch from virtually continuous buffers to an
> array of page pointers, but never finished.
I started to implement that too but unfortunately never had the time to
finish it :-(.
Don't know why you were trying to move to kzalloc-ed buffer, but my
goal was to avoid the extra copy when the controller transfers data
using DMA, and the recent posts regarding vmalloc-ed buffers and DMA
might solve the issue.
This being said, UBI and UBIFS tend to allocate big portions of
memory (usually a full eraseblock), and sometime this is
overkill.
For example, I'm not sure we need to allocate that much memory to do
things like 'check if this portion is all filled with 0xff'. Allocating
a ->max_write_size buffer and iterating over write-units should be
almost as efficient and still consume less memory. But this has nothing
to do with the vmalloc vs kmalloc debate ;-).
next prev parent reply other threads:[~2016-12-05 8:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-04 6:12 [PATCH 1/1] mtd: ubi: fix improper return value Pan Bian
2016-12-04 12:48 ` Marek Vasut
2016-12-04 20:33 ` Joe Perches
2016-12-04 20:52 ` Richard Weinberger
2016-12-05 7:09 ` Artem Bityutskiy
2016-12-05 8:23 ` Boris Brezillon [this message]
2016-12-05 9:49 ` Artem Bityutskiy
2016-12-04 21:36 ` Marek Vasut
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=20161205092340.6c119305@bbrezillon \
--to=boris.brezillon@free-electrons.com \
--cc=bianpan201604@163.com \
--cc=bianpan2016@163.com \
--cc=computersforpeace@gmail.com \
--cc=cyrille.pitchen@atmel.com \
--cc=dedekind1@gmail.com \
--cc=dwmw2@infradead.org \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=richard@nod.at \
/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