[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181029175639.GJ21857@kernel.org>
Date: Mon, 29 Oct 2018 14:56:39 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: David Miller <davem@...emloft.net>
Cc: kan.liang@...ux.intel.com, linux-kernel@...r.kernel.org,
wangnan0@...wei.com, jolsa@...nel.org, namhyung@...nel.org,
kan.liang@...el.com, ak@...ux.intel.com, yao.jin@...ux.intel.com,
peterz@...radead.org
Subject: Re: [PATCHES/RFC] Re: A concern about overflow ring buffer mode
Em Mon, Oct 29, 2018 at 10:43:21AM -0700, David Miller escreveu:
> From: "Liang, Kan" <kan.liang@...ux.intel.com>
> Date: Mon, 29 Oct 2018 11:11:25 -0400
>
> > The processing time for each perf_top__mmap_read_idx() should not that
> > long. We may check it after each perf_top__mmap_read_idx(). Also
> > change the ui_warning to one-time warning. The patch as below can do
> > that (not test).
>
> You cannot make ui__*() calls from the event processing thread.
>
> I tried to make this point strongly over the weekend.
>
> It hangs the event thread, because the ui call waits for a keypress
> but the display thread will eat them up and the event thread thus
> hangs in select().
>
> So, once more, all ui calls must be avoided in event processing code.
>
> Said another way, it is not legal to call UI interfaces from any
> code that could be called by the event thread.
Right, that global in fact needs to be set in the event processing and
checked in the display thread, start it with 0, switch to 1 and then to
2 to say it was processed just once, etc.
- Arnaldo
Powered by blists - more mailing lists