Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1535888

Re: [PATCH 1/1] mtd: ubi: fix improper return value

From Boris Brezillon <boris.brezillon@free-electrons.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/1] mtd: ubi: fix improper return value
Date 2016-12-05 09:30 +0100
Message-ID <sKWOR-2aU-9@gated-at.bofh.it> (permalink)
References <sKyjw-3Ap-9@gated-at.bofh.it> <sKH3s-xb-25@gated-at.bofh.it> <sKLJL-3sb-17@gated-at.bofh.it> <sKM38-3yX-15@gated-at.bofh.it> <sKVzs-1nl-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 ;-).

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/1] mtd: ubi: fix improper return value Pan Bian <bianpan201604@163.com> - 2016-12-04 07:20 +0100
  Re: [PATCH 1/1] mtd: ubi: fix improper return value Marek Vasut <marek.vasut@gmail.com> - 2016-12-04 16:40 +0100
    Re: [PATCH 1/1] mtd: ubi: fix improper return value Joe Perches <joe@perches.com> - 2016-12-04 21:40 +0100
      Re: [PATCH 1/1] mtd: ubi: fix improper return value Richard Weinberger <richard@nod.at> - 2016-12-04 22:00 +0100
        Re: [PATCH 1/1] mtd: ubi: fix improper return value Artem Bityutskiy <dedekind1@gmail.com> - 2016-12-05 08:10 +0100
          Re: [PATCH 1/1] mtd: ubi: fix improper return value Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-12-05 09:30 +0100
            Re: [PATCH 1/1] mtd: ubi: fix improper return value Artem Bityutskiy <dedekind1@gmail.com> - 2016-12-05 11:00 +0100
      Re: [PATCH 1/1] mtd: ubi: fix improper return value Marek Vasut <marek.vasut@gmail.com> - 2016-12-04 22:40 +0100

csiph-web