From: "Stefan Riedmüller" <s.riedmueller@phytec.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] mtd: ubi: Max out default wear-leveling threshold
Date: Thu, 11 Jul 2019 13:04:12 +0200 [thread overview]
Message-ID: <cdbaf9d5-940e-db3a-3df9-db3bba5a3ed4@phytec.de> (raw)
In-Reply-To: <20190711070147.weq5bwqh4adw6sfe@pengutronix.de>
Hi Sascha,
On 11.07.19 09:01, Sascha Hauer wrote:
> On Wed, Jul 10, 2019 at 01:27:30PM +0200, Stefan Riedmueller wrote:
>> Due to the recursive ubi_thread implementation in the barebox, a large
>> amount of wear-leveling can lead to a stack overflow.
>>
>> This was observed during extensive ubi stress tests with the linux
>> kernel and periodic power cycles. We found that if the wear-leveling
>> threshold is exceeded and a large amount of erase blocks need
>> wear-leveling the stack can overflow.
>>
>> The hardware used to observe this was a phyCORE-i.MX 6 with 1GB NAND flash.
>>
>> As the kernel is perfectly capable of handling wear-leveling we can
>> increase the wear-leveling threshold in the barebox to leave it to the
>> kernel. To minimize the chance of wear-leveling in the barebox max out
>> the threshold.
>
> I can follow the reasoning and it seems indeed better and more safe to
> leave the wearleveling to the Kernel. Given that, can't we just disable
> wear leveling completely in barebox?
I think it would be best to disable it or at least improve it. But since
wear-leveling is not an isolated task but involved in more functionalities I
couldn't find an easy way to disable it in a quick way. That is why I went
with the threshold enlargement to have at least a quick fix.
But I agree that at some point in the future the root cause should be
handled and not just the symptom.
Stefan
>
> Sascha
>
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2019-07-11 11:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-10 11:27 Stefan Riedmueller
2019-07-11 7:01 ` Sascha Hauer
2019-07-11 11:04 ` Stefan Riedmüller [this message]
2019-07-18 8:24 ` Stefan Riedmüller
2019-07-18 12:19 ` Sascha Hauer
2019-07-18 12:27 ` Stefan Riedmüller
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=cdbaf9d5-940e-db3a-3df9-db3bba5a3ed4@phytec.de \
--to=s.riedmueller@phytec.de \
--cc=barebox@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox