All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: "Michał Kępień" <kernel@kempniu.pl>,
	"Vignesh Raghavendra" <vigneshr@ti.com>,
	"Boris Brezillon" <boris.brezillon@collabora.com>,
	linux-mtd <linux-mtd@lists.infradead.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 4/4] mtdchar: add MEMREAD ioctl
Date: Thu, 3 Feb 2022 11:13:42 +0100 (CET)	[thread overview]
Message-ID: <340602071.12640.1643883222200.JavaMail.zimbra@nod.at> (raw)
In-Reply-To: <20220203104654.6cb43ea3@xps13>

----- Ursprüngliche Mail -----
> Von: "Miquel Raynal" <miquel.raynal@bootlin.com>
>> If mtd->erasesize is large (which is not uncommon these days) you might
>> request more from kmalloc() than it can serve.
>> Maybe kvmalloc() makes more sense?
> 
> Mmmh, I would really like these buffers dma-able.
> 
> I just discovered mtd_kmalloc_up_to(). Would this work?

mtd_kmalloc_up_to() makes sense to be more friendly to the system.
It tries to get memory without forcing write-back and such.
But if we're out of continuous memory it won't help much. 

Regarding dma-able, as soon you use something like UBI/UBIFS ontop of it
the mtd driver has to be able to deal in any way with vmalloc()'ed memory.

Another option would be not working on full erase blocks.

Thanks,
//richard

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

WARNING: multiple messages have this Message-ID (diff)
From: Richard Weinberger <richard@nod.at>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: "Michał Kępień" <kernel@kempniu.pl>,
	"Vignesh Raghavendra" <vigneshr@ti.com>,
	"Boris Brezillon" <boris.brezillon@collabora.com>,
	linux-mtd <linux-mtd@lists.infradead.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 4/4] mtdchar: add MEMREAD ioctl
Date: Thu, 3 Feb 2022 11:13:42 +0100 (CET)	[thread overview]
Message-ID: <340602071.12640.1643883222200.JavaMail.zimbra@nod.at> (raw)
In-Reply-To: <20220203104654.6cb43ea3@xps13>

----- Ursprüngliche Mail -----
> Von: "Miquel Raynal" <miquel.raynal@bootlin.com>
>> If mtd->erasesize is large (which is not uncommon these days) you might
>> request more from kmalloc() than it can serve.
>> Maybe kvmalloc() makes more sense?
> 
> Mmmh, I would really like these buffers dma-able.
> 
> I just discovered mtd_kmalloc_up_to(). Would this work?

mtd_kmalloc_up_to() makes sense to be more friendly to the system.
It tries to get memory without forcing write-back and such.
But if we're out of continuous memory it won't help much. 

Regarding dma-able, as soon you use something like UBI/UBIFS ontop of it
the mtd driver has to be able to deal in any way with vmalloc()'ed memory.

Another option would be not working on full erase blocks.

Thanks,
//richard

  reply	other threads:[~2022-02-03 10:14 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-25 10:48 [PATCH v3 0/4] mtdchar: add MEMREAD ioctl Michał Kępień
2022-01-25 10:48 ` Michał Kępień
2022-01-25 10:48 ` [PATCH v3 1/4] mtd: track maximum number of bitflips for each read request Michał Kępień
2022-01-25 10:48   ` Michał Kępień
2022-01-25 10:48 ` [PATCH v3 2/4] mtd: always initialize 'stats' in struct mtd_oob_ops Michał Kępień
2022-01-25 10:48   ` Michał Kępień
2022-01-25 10:48 ` [PATCH v3 3/4] mtd: add ECC error accounting for each read request Michał Kępień
2022-01-25 10:48   ` Michał Kępień
2022-01-25 10:48 ` [PATCH v3 4/4] mtdchar: add MEMREAD ioctl Michał Kępień
2022-01-25 10:48   ` Michał Kępień
2022-02-03  9:18   ` Richard Weinberger
2022-02-03  9:18     ` Richard Weinberger
2022-02-03  9:46     ` Miquel Raynal
2022-02-03  9:46       ` Miquel Raynal
2022-02-03 10:13       ` Richard Weinberger [this message]
2022-02-03 10:13         ` Richard Weinberger
2022-02-14 11:18         ` Michał Kępień
2022-02-14 11:18           ` Michał Kępień
2022-02-14 11:15     ` Michał Kępień
2022-02-14 11:15       ` Michał Kępień

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=340602071.12640.1643883222200.JavaMail.zimbra@nod.at \
    --to=richard@nod.at \
    --cc=boris.brezillon@collabora.com \
    --cc=kernel@kempniu.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=vigneshr@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.