RE: [PATCH V3 04/12] perf mmap: introduce perf_mmap__read_done

2018-01-11 Thread Liang, Kan
> On Thu, Dec 21, 2017 at 10:08:46AM -0800, kan.li...@intel.com wrote: > > From: Kan Liang > > > > The direction of overwrite mode is backward. The last mmap__read_event > > will set tail to map->prev. Need to correct the map->prev to head which > > is the end of next read. >

RE: [PATCH V3 04/12] perf mmap: introduce perf_mmap__read_done

2018-01-11 Thread Liang, Kan
> On Thu, Dec 21, 2017 at 10:08:46AM -0800, kan.li...@intel.com wrote: > > From: Kan Liang > > > > The direction of overwrite mode is backward. The last mmap__read_event > > will set tail to map->prev. Need to correct the map->prev to head which > > is the end of next read. > > > > It will be

RE: [PATCH V3 04/12] perf mmap: introduce perf_mmap__read_done

2018-01-11 Thread Liang, Kan
> Hi, > > On Tue, Jan 09, 2018 at 03:12:28PM +, Liang, Kan wrote: > > > > > > > > > > > > > > Also I guess the current code might miss some events since the > head > > > can > > > > > be > > > > > > > different between _read_init() and _read_done(), no? > > > > > > > > > > > > > > > > > > >

RE: [PATCH V3 04/12] perf mmap: introduce perf_mmap__read_done

2018-01-11 Thread Liang, Kan
> Hi, > > On Tue, Jan 09, 2018 at 03:12:28PM +, Liang, Kan wrote: > > > > > > > > > > > > > > Also I guess the current code might miss some events since the > head > > > can > > > > > be > > > > > > > different between _read_init() and _read_done(), no? > > > > > > > > > > > > > > > > > > >

Re: [PATCH V3 04/12] perf mmap: introduce perf_mmap__read_done

2018-01-11 Thread Jiri Olsa
On Thu, Dec 21, 2017 at 10:08:46AM -0800, kan.li...@intel.com wrote: > From: Kan Liang > > The direction of overwrite mode is backward. The last mmap__read_event > will set tail to map->prev. Need to correct the map->prev to head which > is the end of next read. > > It will

Re: [PATCH V3 04/12] perf mmap: introduce perf_mmap__read_done

2018-01-11 Thread Jiri Olsa
On Thu, Dec 21, 2017 at 10:08:46AM -0800, kan.li...@intel.com wrote: > From: Kan Liang > > The direction of overwrite mode is backward. The last mmap__read_event > will set tail to map->prev. Need to correct the map->prev to head which > is the end of next read. > > It will be used later. > >

Re: [PATCH V3 04/12] perf mmap: introduce perf_mmap__read_done

2018-01-11 Thread Namhyung Kim
Hi, On Tue, Jan 09, 2018 at 03:12:28PM +, Liang, Kan wrote: > > > > > > > > > > > > Also I guess the current code might miss some events since the head > > can > > > > be > > > > > > different between _read_init() and _read_done(), no? > > > > > > > > > > > > > > > > The overwrite mode

Re: [PATCH V3 04/12] perf mmap: introduce perf_mmap__read_done

2018-01-11 Thread Namhyung Kim
Hi, On Tue, Jan 09, 2018 at 03:12:28PM +, Liang, Kan wrote: > > > > > > > > > > > > Also I guess the current code might miss some events since the head > > can > > > > be > > > > > > different between _read_init() and _read_done(), no? > > > > > > > > > > > > > > > > The overwrite mode

RE: [PATCH V3 04/12] perf mmap: introduce perf_mmap__read_done

2018-01-09 Thread Liang, Kan
> > > > > > > > > > Also I guess the current code might miss some events since the head > can > > > be > > > > > different between _read_init() and _read_done(), no? > > > > > > > > > > > > > The overwrite mode requires the ring buffer to be paused during > > > processing. > > > > The head is

RE: [PATCH V3 04/12] perf mmap: introduce perf_mmap__read_done

2018-01-09 Thread Liang, Kan
> > > > > > > > > > Also I guess the current code might miss some events since the head > can > > > be > > > > > different between _read_init() and _read_done(), no? > > > > > > > > > > > > > The overwrite mode requires the ring buffer to be paused during > > > processing. > > > > The head is

Re: [PATCH V3 04/12] perf mmap: introduce perf_mmap__read_done

2018-01-08 Thread Namhyung Kim
Hi, On Thu, Jan 04, 2018 at 02:00:03PM +, Liang, Kan wrote: > > Hi Kan, > > > > On Wed, Jan 03, 2018 at 02:15:38PM +, Liang, Kan wrote: > > > > Hello, > > > > > > > > On Thu, Dec 21, 2017 at 10:08:46AM -0800, kan.li...@intel.com wrote: > > > > > From: Kan Liang > >

Re: [PATCH V3 04/12] perf mmap: introduce perf_mmap__read_done

2018-01-08 Thread Namhyung Kim
Hi, On Thu, Jan 04, 2018 at 02:00:03PM +, Liang, Kan wrote: > > Hi Kan, > > > > On Wed, Jan 03, 2018 at 02:15:38PM +, Liang, Kan wrote: > > > > Hello, > > > > > > > > On Thu, Dec 21, 2017 at 10:08:46AM -0800, kan.li...@intel.com wrote: > > > > > From: Kan Liang > > > > > > > > > > The

RE: [PATCH V3 04/12] perf mmap: introduce perf_mmap__read_done

2018-01-04 Thread Liang, Kan
> Hi Kan, > > On Wed, Jan 03, 2018 at 02:15:38PM +, Liang, Kan wrote: > > > Hello, > > > > > > On Thu, Dec 21, 2017 at 10:08:46AM -0800, kan.li...@intel.com wrote: > > > > From: Kan Liang > > > > > > > > The direction of overwrite mode is backward. The last >

RE: [PATCH V3 04/12] perf mmap: introduce perf_mmap__read_done

2018-01-04 Thread Liang, Kan
> Hi Kan, > > On Wed, Jan 03, 2018 at 02:15:38PM +, Liang, Kan wrote: > > > Hello, > > > > > > On Thu, Dec 21, 2017 at 10:08:46AM -0800, kan.li...@intel.com wrote: > > > > From: Kan Liang > > > > > > > > The direction of overwrite mode is backward. The last > mmap__read_event > > > > will

Re: [PATCH V3 04/12] perf mmap: introduce perf_mmap__read_done

2018-01-03 Thread Namhyung Kim
Hi Kan, On Wed, Jan 03, 2018 at 02:15:38PM +, Liang, Kan wrote: > > Hello, > > > > On Thu, Dec 21, 2017 at 10:08:46AM -0800, kan.li...@intel.com wrote: > > > From: Kan Liang > > > > > > The direction of overwrite mode is backward. The last mmap__read_event > > > will

Re: [PATCH V3 04/12] perf mmap: introduce perf_mmap__read_done

2018-01-03 Thread Namhyung Kim
Hi Kan, On Wed, Jan 03, 2018 at 02:15:38PM +, Liang, Kan wrote: > > Hello, > > > > On Thu, Dec 21, 2017 at 10:08:46AM -0800, kan.li...@intel.com wrote: > > > From: Kan Liang > > > > > > The direction of overwrite mode is backward. The last mmap__read_event > > > will set tail to map->prev.

RE: [PATCH V3 04/12] perf mmap: introduce perf_mmap__read_done

2018-01-03 Thread Liang, Kan
> Hello, > > On Thu, Dec 21, 2017 at 10:08:46AM -0800, kan.li...@intel.com wrote: > > From: Kan Liang > > > > The direction of overwrite mode is backward. The last mmap__read_event > > will set tail to map->prev. Need to correct the map->prev to head > > which is the end of

RE: [PATCH V3 04/12] perf mmap: introduce perf_mmap__read_done

2018-01-03 Thread Liang, Kan
> Hello, > > On Thu, Dec 21, 2017 at 10:08:46AM -0800, kan.li...@intel.com wrote: > > From: Kan Liang > > > > The direction of overwrite mode is backward. The last mmap__read_event > > will set tail to map->prev. Need to correct the map->prev to head > > which is the end of next read. > > Why

Re: [PATCH V3 04/12] perf mmap: introduce perf_mmap__read_done

2018-01-01 Thread Namhyung Kim
Hello, On Thu, Dec 21, 2017 at 10:08:46AM -0800, kan.li...@intel.com wrote: > From: Kan Liang > > The direction of overwrite mode is backward. The last mmap__read_event > will set tail to map->prev. Need to correct the map->prev to head which > is the end of next read. Why

Re: [PATCH V3 04/12] perf mmap: introduce perf_mmap__read_done

2018-01-01 Thread Namhyung Kim
Hello, On Thu, Dec 21, 2017 at 10:08:46AM -0800, kan.li...@intel.com wrote: > From: Kan Liang > > The direction of overwrite mode is backward. The last mmap__read_event > will set tail to map->prev. Need to correct the map->prev to head which > is the end of next read. Why do you update the