From: "bibo,mao" <bibo_mao@linux.intel.com>
To: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: "bibo,mao" <bibo.mao@intel.com>,
"Keshavamurthy, Anil S" <anil.s.keshavamurthy@intel.com>,
Ananth N Mavinakayanahalli <ananth@in.ibm.com>,
Prasanna S Panchamukhi <prasanna@in.ibm.com>,
Ingo Molnar <mingo@redhat.com>,
SystemTAP <systemtap@sources.redhat.com>,
Satoshi Oshima <soshima@redhat.com>,
Hideo Aoki <haoki@redhat.com>,
Yumiko Sugita <yumiko.sugita.yf@hitachi.com>
Subject: Re: [RFC][PATCH][kprobe] enabling booster on the preemptible kernel, take 2
Date: Tue, 31 Oct 2006 09:14:00 -0000 [thread overview]
Message-ID: <4546BCE7.9030008@linux.intel.com> (raw)
In-Reply-To: <454606EC.1030807@hitachi.com>
Masami Hiramatsu wrote:
> Hi bibo,
>
> Thank you for your review!
>
> bibo,mao wrote:
>> This patch will boost kprobe on preemptible kernel, I think
>> it is deserved to waster some memory for better performance
>> by deferring memory free after freeze_processes.
>
> I think it doesn't waste memory so much, because it tries
> to reuse garbage memories before the kernel allocates an
> additional page.
>
> [...]
>>> +static int __kprobes collect_garbage_slots(void)
>>> +{
>>> + struct kprobe_insn_page *kip;
>>> + struct hlist_node *pos, *next;
>>> + int ret = -1;
>>> +
>>> +#if defined(CONFIG_PREEMPT) && defined(CONFIG_PM)
>>> + /* Ensure no-one is preepmted on the garbages */
>>> + if (freeze_processes() != 0)
>> I do not know whether there exists non-freezeable and preemptive kernel
>> thread, if there exist then this thread will not be frozen.
>
> In that case, freeze_processes() returns the positive value which
> means how many processes are not frozen. If freeze_processes()
> returns non-zero, this function aborts the garbage collection.
>
But from the code, return value of freeze_processes() represents how many
processes can be frozen but are not frozen. I grep the kernel code, there
still exists many processes which flag is PF_NOFREEZE.
I think if current probed thread is PF_NOFREEZE, then kprobe_handler need
skip the bootser.
thanks
bibo,mao
next prev parent reply other threads:[~2006-10-31 3:03 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-16 13:14 Masami Hiramatsu
2006-10-19 9:00 ` [PATCH 1/5][djprobe] generalize the length of the instruction slots Masami Hiramatsu
2006-10-19 9:03 ` [PATCH 3/5][djprobe] export set_jmp_op() for sharing Masami Hiramatsu
2006-10-19 9:03 ` [PATCH 4/5][djprobe] djprobe for i386 architecture code Masami Hiramatsu
2006-10-19 9:03 ` [PATCH 2/5][djprobe] djprobe core patch Masami Hiramatsu
2006-10-27 23:34 ` Keshavamurthy, Anil S
2006-10-30 14:07 ` Masami Hiramatsu
2006-10-30 14:11 ` Ingo Molnar
2006-10-19 9:04 ` [PATCH 5/5][djprobe] delayed invoking commit_djprobes() Masami Hiramatsu
2006-10-19 9:04 ` [RFC][djprobe] djprobe examples Masami Hiramatsu
2006-10-30 6:37 ` [RFC][PATCH][kprobe] enabling booster on the preemptible kernel, take 2 bibo,mao
2006-10-30 14:07 ` Masami Hiramatsu
2006-10-31 9:14 ` bibo,mao [this message]
2006-10-31 13:47 ` Masami Hiramatsu
2006-10-31 13:49 ` Ingo Molnar
2006-10-31 14:13 ` Ingo Molnar
2006-10-31 16:39 ` Masami Hiramatsu
2006-11-01 17:01 bibo mao
2006-11-02 18:51 ` Masami Hiramatsu
2006-11-03 9:16 ` bibo,mao
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=4546BCE7.9030008@linux.intel.com \
--to=bibo_mao@linux.intel.com \
--cc=ananth@in.ibm.com \
--cc=anil.s.keshavamurthy@intel.com \
--cc=bibo.mao@intel.com \
--cc=haoki@redhat.com \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mingo@redhat.com \
--cc=prasanna@in.ibm.com \
--cc=soshima@redhat.com \
--cc=systemtap@sources.redhat.com \
--cc=yumiko.sugita.yf@hitachi.com \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).