All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: hujianyang <hujianyang@huawei.com>,
	Artem Bityutskiy <dedekind1@gmail.com>
Cc: linux-mtd <linux-mtd@lists.infradead.org>
Subject: Re: ubi_check_volume() hung on a single core system
Date: Wed, 24 Dec 2014 14:29:01 +0100	[thread overview]
Message-ID: <549ABF9D.6030901@nod.at> (raw)
In-Reply-To: <549AAD57.8020307@huawei.com>

Am 24.12.2014 um 13:11 schrieb hujianyang:
> Hi,
> 
> When I was running mtd-utils/tests/ubi-tests/io_basic.c on a
> single core system, watchdog reset the OS and printed:
> 
> ERR:The task of feeding senior watchdog overtimes, system will reset!
> 
> io_basic.c tests the UBI_IOCVOLUP feature of UBI driver. UBI
> will perform ubi_check_volume() after updating operation is
> finished. The used ebs will be scanned for a static volume in
> this function.
> 
> If I run schedule() in the loop of eraseblock scanning, the
> *reset* not happen and the system works in right condition.
> 
> diff --git a/drivers/mtd/ubi/misc.c b/drivers/mtd/ubi/misc.c
> index dbda77e..f4f478c 100644
> --- a/drivers/mtd/ubi/misc.c
> +++ b/drivers/mtd/ubi/misc.c
> @@ -74,6 +74,9 @@ int ubi_check_volume(struct ubi_device *ubi, int vol_id)
>         for (i = 0; i < vol->used_ebs; i++) {
>                 int size;
> 
> +               set_current_state(TASK_UNINTERRUPTIBLE);
> +               schedule_timeout(HZ/10);

cond_resched() please.

>                 if (i == vol->used_ebs - 1)
>                         size = vol->last_eb_bytes;
>                 else
> 
> 
> 
> I think this error can't be re-created on a multi-core system.
> It can only happen on a single core system. This directly
> schedule I modified would hurt the performance of volume check.
> 
> Does anyone interested in this issue?

Of course!

Thanks,
//richard

  reply	other threads:[~2014-12-24 13:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-24 12:11 ubi_check_volume() hung on a single core system hujianyang
2014-12-24 13:29 ` Richard Weinberger [this message]
2014-12-25  4:43   ` hujianyang

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=549ABF9D.6030901@nod.at \
    --to=richard@nod.at \
    --cc=dedekind1@gmail.com \
    --cc=hujianyang@huawei.com \
    --cc=linux-mtd@lists.infradead.org \
    /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.