mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: wuqiang <wuqiang.matt@bytedance.com>
Cc: davem@davemloft.net, anil.s.keshavamurthy@intel.com,
	naveen.n.rao@linux.ibm.com, linux-kernel@vger.kernel.org,
	mattwu@163.com
Subject: Re: [PATCH] kretprobe events missing on 2-core KVM guest
Date: Wed, 26 Oct 2022 00:33:15 +0900	[thread overview]
Message-ID: <20221026003315.266d59d5c0780c2817be3a0d@kernel.org> (raw)
In-Reply-To: <20221025100117.18667-1-wuqiang.matt@bytedance.com>

On Tue, 25 Oct 2022 18:01:17 +0800
wuqiang <wuqiang.matt@bytedance.com> wrote:

> Default value of maxactive is set as num_possible_cpus() for nonpreemptable
> systems. For a 2-core system, only 2 kretprobe instances would be allocated
> in default, then these 2 instances for execve kretprobe are very likely to
> be used up with a pipelined command.
> 
> This patch increases the minimum of maxactive to 10.
> 

This looks reasonable to me.

Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>

Thank you!

> Signed-off-by: wuqiang <wuqiang.matt@bytedance.com>
> ---
>  kernel/kprobes.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/kprobes.c b/kernel/kprobes.c
> index 3220b0a2fb4a..b781dee3f552 100644
> --- a/kernel/kprobes.c
> +++ b/kernel/kprobes.c
> @@ -2211,7 +2211,7 @@ int register_kretprobe(struct kretprobe *rp)
>  #ifdef CONFIG_PREEMPTION
>  		rp->maxactive = max_t(unsigned int, 10, 2*num_possible_cpus());
>  #else
> -		rp->maxactive = num_possible_cpus();
> +		rp->maxactive = max_t(unsigned int, 10, num_possible_cpus());
>  #endif
>  	}
>  #ifdef CONFIG_KRETPROBE_ON_RETHOOK
> -- 
> 2.34.1
> 


-- 
Masami Hiramatsu (Google) <mhiramat@kernel.org>

  reply	other threads:[~2022-10-25 15:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-25 10:01 wuqiang
2022-10-25 15:33 ` Masami Hiramatsu [this message]
2022-11-07 13:36   ` Solar Designer
2022-11-08  2:50     ` wuqiang
2022-11-10  8:15   ` [PATCH v2] kprobes: " wuqiang
2022-11-10 14:52     ` Solar Designer
2022-11-14  5:45       ` Masami Hiramatsu

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=20221026003315.266d59d5c0780c2817be3a0d@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=anil.s.keshavamurthy@intel.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mattwu@163.com \
    --cc=naveen.n.rao@linux.ibm.com \
    --cc=wuqiang.matt@bytedance.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

all inboxes | Powered by JetHome®