All of lore.kernel.org
 help / color / mirror / Atom feed
From: "zhangwei(Jovi)" <jovi.zhangwei@huawei.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Ingo Molnar <mingo@redhat.com>,
	Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
	Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tracing/uprobes: Support ftrace_event_file base multibuffer
Date: Fri, 21 Jun 2013 16:17:20 +0800	[thread overview]
Message-ID: <51C40C10.9040306@huawei.com> (raw)
In-Reply-To: <20130620164355.GA7910@redhat.com>

On 2013/6/21 0:43, Oleg Nesterov wrote:
> Hi,
> 
> Now that we finished the discussion of the similar code in kprobes,
> let me summarize.
> 
> On 06/14, Oleg Nesterov wrote:
>>
>> On 06/14, zhangwei(Jovi) wrote:
>>>
>>> +		rcu_assign_pointer(tu->files, new);
>>> +		tu->flags |= TP_FLAG_TRACE;
>>> +
>>> +		if (old) {
>>> +			/* Make sure the probe is done with old files */
>>> +			synchronize_sched();
>>> +			kfree(old);
>>> +		}
>>> +	} else
>>> +		tu->flags |= TP_FLAG_PROFILE;
>>
>> So it can set both TP_FLAG_TRACE and TP_FLAG_PROFILE, yes?
>>
>> If yes, this is not right. Until we change the pre-filtering at least.
>> Currently TP_FLAG_TRACE/TP_FLAG_PROFILE are mutually exclusive.
> 
> Yes. So please update this patch so that TP_FLAG_PROFILE can't be
> set if TP_FLAG_TRACE is set and vice versa.
> 
> Once again, this limitation is artificial. But it was always here,
> and we need more changes to remove it. I'll try to do this later.
> (but if you want to play with this code - welcome ;)
> 
> Don't add the mutex, and do not use array-of-pointers (I hope you
> noticed the recent discussion).
> 
> Locking. Oh, OK. Let it be rcu for now (but please do not forget
> that you need rcu_read_lock, uprobe handlers run in the sleepable
> context). This is sub-optimal, but this is just another indication
> that uprobes API is not perfect, we can't use uprobe->register_sem.
> 
> Also. When I was reading trace_kprobes.c I notice the new (and imho
> useful) feature, soft disable/enable. Perhaps you can make a 2nd
> patch which adds the FTRACE_EVENT_FL_SOFT_DISABLED_BIT check?
> 
> Oleg.
> 
Thanks Oleg, I will send v2 patch soon.

.jovi





      reply	other threads:[~2013-06-21  8:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-14  1:44 [PATCH] tracing/uprobes: Support ftrace_event_file base multibuffer zhangwei(Jovi)
2013-06-14 13:21 ` Masami Hiramatsu
2013-06-14 13:51   ` Oleg Nesterov
2013-06-14 14:09     ` Oleg Nesterov
2013-06-14 15:31   ` Steven Rostedt
2013-06-14 16:21     ` Paul E. McKenney
2013-06-14 16:33       ` Steven Rostedt
2013-06-14 17:25         ` Paul E. McKenney
2013-06-17  2:54           ` Masami Hiramatsu
2013-06-17 12:33             ` Steven Rostedt
2013-06-18  1:31               ` Masami Hiramatsu
2013-06-18  2:02                 ` Steven Rostedt
2013-06-14 14:44 ` Oleg Nesterov
2013-06-14 16:04   ` ftrace multibuffer && rcu (Was: tracing/uprobes: Support ftrace_event_file base multibuffer) Oleg Nesterov
2013-06-14 16:18     ` Oleg Nesterov
2013-06-14 16:26     ` Steven Rostedt
2013-06-14 17:02       ` Oleg Nesterov
2013-06-20 16:43   ` [PATCH] tracing/uprobes: Support ftrace_event_file base multibuffer Oleg Nesterov
2013-06-21  8:17     ` zhangwei(Jovi) [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=51C40C10.9040306@huawei.com \
    --to=jovi.zhangwei@huawei.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mingo@redhat.com \
    --cc=oleg@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=srikar@linux.vnet.ibm.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 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.