From: Don Zickus <dzickus@redhat.com>
To: Mike Lykov <combr@yandex.ru>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Ingo Molnar <mingo@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org,
kirill@shutemov.name
Subject: Re: [BUG?] false positive in soft lockup detector while unlzma initramfs on slow cpu
Date: Wed, 30 Jan 2013 10:40:33 -0500 [thread overview]
Message-ID: <20130130154033.GE98867@redhat.com> (raw)
In-Reply-To: <5108EA4B.7030003@yandex.ru>
On Wed, Jan 30, 2013 at 01:39:23PM +0400, Mike Lykov wrote:
> 29.01.2013 19:33, Don Zickus пишет:
>
> >The softlockup mechanism works scheduling a high priority task that kicks
> >the softlockups. If the unzip thread is taking too long, it could
> >accidentally trip the detection.
>
> Inyerestingly, that a decompress of lzma -4 takes longer time than
> decompress lzma -9, and it stated in man lzma(1):
> " On the same hardware, the decompression speed is approximately
> a constant number of bytes of compressed data per second. In other
> words, the better the compression, the faster the decompression
> will usually be. "
>
> I tested it on target computer by hand:
>
> lzma -4 compressed: time unlzma initram-alt-p6rel3-4.cpio.lzma
> 20.94user 1.47system 0:22:45elapsed 99%CPU (...19424maxresidents)k
>
> lzma -9 compressed: time unlzma initram-alt-p6rel3-9.cpio.lzma
> 19.49user 1.92system 0:21:44elapsed 99%CPU (...241488maxresidents)k
>
> So, it cannot "take too long" because not-working faster than working.
> Apparently time not matter, but algorithm complexity?
>
> >>2. How to change watchdog_thresh parameter at boot without patching
> >>sources? If it necessary (with it side effects) maybe implement it
> >>as commandline parameter or config compile time parameter?
> >
> >I attached a patch below that allows you to set it a boot time. Let me
> >know if this works for you, then I can clean it up and post it properly.
>
> It not works for me. I apply this patch, build, use ("int
> __read_mostly watchdog_thresh = 10;" as in original)
> command line:
>
> [ 0.000000] Kernel command line:
> initrd=initram-alt-p6rel3-9.cpio.lzma console=uart,io,0x240,115200n8
> kernel.watchdog_thresh=30
I have never seen usage like 'kernel.watchdog_thresh=30'. Could you try
'watchdog_thresh=30' instead?
I also attached another patch as suggested by Andrew to add a
touch_softlockup_watchdog in the unlzma routine. Probably makes things
run a little slower. Compiled tested only.
Cheers,
Don
diff --git a/lib/decompress_unlzma.c b/lib/decompress_unlzma.c
index 32adb73..313f4fa 100644
--- a/lib/decompress_unlzma.c
+++ b/lib/decompress_unlzma.c
@@ -36,6 +36,7 @@
#endif /* STATIC */
#include <linux/decompress/mm.h>
+#include <linux/nmi.h>
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
@@ -648,6 +649,7 @@ STATIC inline int INIT unlzma(unsigned char *buf, int in_len,
}
if (rc.buffer_size <= 0)
goto exit_3;
+ touch_softlockup_watchdog();
}
if (posp)
next prev parent reply other threads:[~2013-01-30 15:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-29 13:42 [BUG?] false positive in soft lockup detector while unlzma initramfs on slow cpu Mike Lykov
2013-01-29 15:33 ` Don Zickus
2013-01-29 17:18 ` anish kumar
2013-01-30 15:51 ` Don Zickus
2013-01-30 15:59 ` anish kumar
2013-01-29 23:59 ` Andrew Morton
2013-01-31 11:18 ` Ingo Molnar
2013-01-30 9:39 ` Mike Lykov
2013-01-30 15:40 ` Don Zickus [this message]
2013-01-31 11:21 ` Mike Lykov
2013-01-31 14:46 ` Don Zickus
2013-02-01 10:44 ` Mike Lykov
2013-02-01 15:59 ` Don Zickus
2013-02-01 16:43 ` Mike Lykov
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=20130130154033.GE98867@redhat.com \
--to=dzickus@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=combr@yandex.ru \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.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