Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1537428

Re: [PATCH 03/10] perf sched timehist: Handle zero sample->tid properly

From Namhyung Kim <namhyung@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 03/10] perf sched timehist: Handle zero sample->tid properly
Date 2016-12-07 03:30 +0100
Message-ID <sLA9A-1Ws-7@gated-at.bofh.it> (permalink)
References <sLeVr-55B-3@gated-at.bofh.it> <sLeVs-55B-23@gated-at.bofh.it> <sLf57-58I-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Dec 05, 2016 at 07:52:57PM -0800, David Ahern wrote:
> On 12/5/16 7:40 PM, Namhyung Kim wrote:
> > Sometimes samples have tid of 0 but non-0 pid.  It ends up having a
> 
> Any idea how that happens?

It seems that an exiting task wakes up its parent and the parent might
call wait(2) concurrently.  So at the time of calling last schedule(),
its pid (and tgid) link might be unhashed by the parent and can have 0
sample->tid and/or sample->pid depending on timing IMHO.  Not sure
anything guarantees that the sample tid/pid is preserved during the
event.  From a quick look I couldn't find..

If that's true we need to somehow make sure that sample->tid of 0 is
actually from idle task or not.

Thanks,
Namhyung

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 03/10] perf sched timehist: Handle zero sample->tid properly Namhyung Kim <namhyung@kernel.org> - 2016-12-06 04:50 +0100
  Re: [PATCH 03/10] perf sched timehist: Handle zero sample->tid  properly David Ahern <dsahern@gmail.com> - 2016-12-06 05:00 +0100
    Re: [PATCH 03/10] perf sched timehist: Handle zero sample->tid properly Namhyung Kim <namhyung@kernel.org> - 2016-12-06 05:10 +0100
      Re: [PATCH 03/10] perf sched timehist: Handle zero sample->tid  properly David Ahern <dsahern@gmail.com> - 2016-12-06 05:10 +0100
    Re: [PATCH 03/10] perf sched timehist: Handle zero sample->tid  properly Namhyung Kim <namhyung@kernel.org> - 2016-12-07 03:30 +0100
      Re: [PATCH 03/10] perf sched timehist: Handle zero sample->tid  properly Namhyung Kim <namhyung@kernel.org> - 2016-12-08 15:30 +0100
  [tip:perf/core] perf sched timehist: Handle zero sample->tid  properly tip-bot for Namhyung Kim <tipbot@zytor.com> - 2016-12-07 19:30 +0100

csiph-web