From: Richard Weinberger <richard@nod.at>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: boris.brezillon@free-electrons.com,
linux-mtd@lists.infradead.org, dedekind1@gmail.com
Subject: Re: [PATCH] ubi: Speedup ubi_io_read_vid_hdr()
Date: Mon, 27 Jun 2016 09:05:59 +0200 [thread overview]
Message-ID: <5770D057.4040306@nod.at> (raw)
In-Reply-To: <20160627052239.GP20657@pengutronix.de>
Am 27.06.2016 um 07:22 schrieb Sascha Hauer:
> On Sat, Jun 25, 2016 at 10:39:51AM +0200, Richard Weinberger wrote:
>> Currently we read a whole (sub)page from flash when reading
>> the VID header.
>> Sascha reported that reading only UBI_VID_HDR_SIZE instead
>> gives him a decent speedup during a full scan.
>>
>> Since we have to obey shifted headers too we have to read
>> ubi->vid_hdr_shift + UBI_VID_HDR_SIZE bytes.
>> It is also important to set the buffer to 0xff bytes before
>> reading as in ubi_io_write_vid_hdr() the whole (sub)page
>> is written back to flash and we cannot risk leaking
>> kernel memory into the storage medium.
>>
>> Reported-by: Sascha Hauer <s.hauer@pengutronix.de>
>> Signed-off-by: Richard Weinberger <richard@nod.at>
>> ---
>> Sascha,
>>
>> can you please this patch a try?
>
> I already did, this was exactly my suggestion after you mentioned that
> my initial patch breaks when vid_hdr_shift is non zero.
> I tested it without the memset though.
Yeah, the memset() is not needed, I was wrong.
So we can take your version.
Thanks,
//richard
next prev parent reply other threads:[~2016-06-27 7:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-23 13:29 [PATCH] UBI: only read UBI_VID_HDR_SIZE when reading the vid_hdr Sascha Hauer
2016-06-23 14:38 ` Richard Weinberger
2016-06-23 15:06 ` Sascha Hauer
2016-06-23 15:16 ` Richard Weinberger
2016-06-24 6:10 ` Sascha Hauer
2016-06-24 7:39 ` Boris Brezillon
2016-06-25 8:39 ` [PATCH] ubi: Speedup ubi_io_read_vid_hdr() Richard Weinberger
2016-06-25 9:02 ` Richard Weinberger
2016-06-27 5:22 ` Sascha Hauer
2016-06-27 7:05 ` Richard Weinberger [this message]
2016-06-25 8:41 ` [PATCH] UBI: only read UBI_VID_HDR_SIZE when reading the vid_hdr Richard Weinberger
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=5770D057.4040306@nod.at \
--to=richard@nod.at \
--cc=boris.brezillon@free-electrons.com \
--cc=dedekind1@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/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.