Re: [PATCH] ring-buffer: Fix polling on trace_pipe

2014-07-15 Thread Martin Lau
Yes, I think it should go to both stable and 3.16. Thanks, --Martin On Tue, Jul 15, 2014 at 03:46:12PM -0400, Steven Rostedt wrote: > On Thu, 10 Jul 2014 15:20:30 -0700 > Martin Lau wrote: > > > Hi Steve, > > > > Do you have a chance to give it another try? > > > > OK, I finally got around t

Re: [PATCH] ring-buffer: Fix polling on trace_pipe

2014-07-15 Thread Steven Rostedt
On Thu, 10 Jul 2014 15:20:30 -0700 Martin Lau wrote: > Hi Steve, > > Do you have a chance to give it another try? > OK, I finally got around to testing it. Yep I see your point. Do you think it should go to 3.16 and stable? I can add it to my next git pull request. Also, I modified your test

Re: [PATCH] ring-buffer: Fix polling on trace_pipe

2014-07-15 Thread Chris Mason
On 06/10/2014 02:06 AM, Martin Lau wrote: > ring_buffer_poll_wait() should always put the poll_table to its wait_queue > even there is immediate data available. Otherwise, the following epoll and > read sequence will eventually hang forever: > > 1. Put some data to make the trace_pipe ring_buff

Re: [PATCH] ring-buffer: Fix polling on trace_pipe

2014-07-10 Thread Martin Lau
Hi Steve, Do you have a chance to give it another try? Thanks, Martin On Thu, Jun 26, 2014 at 11:52:44PM -0700, Martin Lau wrote: > Hi Steve, > > I retried the test program (with the kernel patch). It does block from > time to time. I spotted the ee.events is not set to EPOLLIN before > calli

Re: [PATCH] ring-buffer: Fix polling on trace_pipe

2014-06-26 Thread Martin Lau
Hi Steve, I retried the test program (with the kernel patch). It does block from time to time. I spotted the ee.events is not set to EPOLLIN before calling epll_ctl(eft, EPOLL_CTL_ADD,...). I fixed it and ran the test in a bash-loop. I have the kafai-2 version attached (with some more logging

Re: [PATCH] ring-buffer: Fix polling on trace_pipe

2014-06-26 Thread Steven Rostedt
On Thu, 26 Jun 2014 11:34:46 -0700 Martin Lau wrote: > Hi Steve, > > Can the modified test program reproduce the problem in your test setup? Ah sorry, got distracted by other work. OK, I just tried it out, and here's my results: I ran you code with my current kernel and this is what I got: #

Re: [PATCH] ring-buffer: Fix polling on trace_pipe

2014-06-26 Thread Martin Lau
Hi Steve, Can the modified test program reproduce the problem in your test setup? Thanks, --Martin On Tue, Jun 10, 2014 at 10:58:14PM -0700, Martin Lau wrote: > Hi Steve, > > Attached is the modified test program. Here is the sample output: > > localhost ~ # ./ftrace-test-epoll-kafai >

Re: [PATCH] ring-buffer: Fix polling on trace_pipe

2014-06-10 Thread Martin Lau
Hi Steve, Attached is the modified test program. Here is the sample output: localhost ~ # ./ftrace-test-epoll-kafai <...>-1857 [000] ...1 720.174295: tracing_mark_write: some data 1857: waitting for more data.. 1858: written more data Thanks, --Martin On Tue, Jun 10, 2014 at

Re: [PATCH] ring-buffer: Fix polling on trace_pipe

2014-06-10 Thread Steven Rostedt
On Mon, 9 Jun 2014 23:06:42 -0700 Martin Lau wrote: > ring_buffer_poll_wait() should always put the poll_table to its wait_queue > even there is immediate data available. Otherwise, the following epoll and > read sequence will eventually hang forever: > > 1. Put some data to make the trace_pipe