linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Xishi Qiu <qiuxishi@huawei.com>
To: Vegard Nossum <vegard.nossum@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Vegard Nossum <vegardno@ifi.uio.no>,
	Pekka Enberg <penberg@kernel.org>, Mel Gorman <mgorman@suse.de>,
	wangnan0@huawei.com, the arch/x86 maintainers <x86@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Linux MM <linux-mm@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Xishi Qiu <qiuxishi@huawei.com>
Subject: Re: [PATCH] mm: add a new command-line kmemcheck value
Date: Tue, 11 Feb 2014 15:17:06 +0800	[thread overview]
Message-ID: <52F9CE72.30303@huawei.com> (raw)
In-Reply-To: <52DF1D59.8090803@huawei.com>

On 2014/1/22 9:22, Xishi Qiu wrote:

> 
> Hi Vegard,
> 
> In some scenes, user want to check memory dynamicly, this "dynamically" 
> means we can turn on/off the feature at boottime, not runtime. Without 
> this patch, if user want to use this feature, he should change config 
> and build the kernel, then reboot. This is impossilbe if user has no 
> kernel code or he don't know how to build the kernel.
> 
> boottime: kmemcheck=0/1/2/3 (command-line)
> runtime: kmemcheck=0/1/2 (/proc/sys/kernel/kmemcheck)
> 
> The main different between kmemcheck=0 and 3 is the used memory. Kmemcheck 
> will use about twice as much memory as normal.
> 
> Thanks,
> Xishi Qiu
> 
> --

Hi Vegard,

What do you think of this feature? 

Add a command-line "kmemcheck=3", then the kernel runs as the same as CONFIG_KMEMCHECK=off
even CONFIG_KMEMCHECK is turn on. "kmemcheck=0/1/2" is the same as originally. 
In another word, "kmemcheck=3" is the same as:
1) turn off CONFIG_KMEMCHECK
2) rebuild the kernel
3) reboot
The different between kmemcheck=0 and 3 is the used memory and nr_cpus.
Also kmemcheck=0 can used in runtime, and kmemcheck=3 is only used in boot.

I think this feature can help users to debug the kernel quickly, It is no 
need to open CONFIG_KMEMCHECK and rebuild it. Especially sometimes users don't
have the kernel source code or the code is different from www.kernel.org.
e.g. some private features were added to the kernel source code, and usually 
users can not have the source code. 

Thanks,
Xishi Qiu

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2014-02-11  7:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-31  8:32 [PATCH] mm: add a new command-line kmemcheck value Xishi Qiu
2013-12-31 10:12 ` Vegard Nossum
2014-01-02  1:34   ` Xishi Qiu
2014-01-10 16:02     ` Vegard Nossum
2014-01-22  1:22       ` Xishi Qiu
2014-02-11  7:17         ` Xishi Qiu [this message]

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=52F9CE72.30303@huawei.com \
    --to=qiuxishi@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=penberg@kernel.org \
    --cc=vegard.nossum@gmail.com \
    --cc=vegardno@ifi.uio.no \
    --cc=wangnan0@huawei.com \
    --cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).