Re: [PATCH v2 1/6] sched_clock: Expose struct clock_read_data

2020-07-15 Thread Peter Zijlstra
On Wed, Jul 15, 2020 at 11:23:45AM +0200, Ahmed S. Darwish wrote: > > Can we then please replace the raw_read_seqcount(), in the original > patch which started this discussion, with raw_read_seqcount_latch()? Separate patch please, but ACK for making the change.

Re: [PATCH v2 1/6] sched_clock: Expose struct clock_read_data

2020-07-15 Thread Ahmed S. Darwish
On Wed, Jul 15, 2020 at 10:14:43AM +0200, pet...@infradead.org wrote: > On Wed, Jul 15, 2020 at 10:12:22AM +0200, Peter Zijlstra wrote: > > On Wed, Jul 15, 2020 at 07:56:50AM +0200, Ahmed S. Darwish wrote: > > > On Wed, Jul 15, 2020 at 10:05:07AM +0800, Leo Yan wrote: > > > > From: Peter Zijlstra

Re: [PATCH v2 1/6] sched_clock: Expose struct clock_read_data

2020-07-15 Thread peterz
On Wed, Jul 15, 2020 at 10:12:22AM +0200, Peter Zijlstra wrote: > On Wed, Jul 15, 2020 at 07:56:50AM +0200, Ahmed S. Darwish wrote: > > On Wed, Jul 15, 2020 at 10:05:07AM +0800, Leo Yan wrote: > > > From: Peter Zijlstra > > > > > ... > > > > > > Provide struct clock_read_data and two (seqcount) he

Re: [PATCH v2 1/6] sched_clock: Expose struct clock_read_data

2020-07-15 Thread Peter Zijlstra
On Wed, Jul 15, 2020 at 07:56:50AM +0200, Ahmed S. Darwish wrote: > On Wed, Jul 15, 2020 at 10:05:07AM +0800, Leo Yan wrote: > > From: Peter Zijlstra > > > ... > > > > Provide struct clock_read_data and two (seqcount) helpers so that > > architectures (arm64 in specific) can expose the numbers to

Re: [PATCH v2 1/6] sched_clock: Expose struct clock_read_data

2020-07-15 Thread Ahmed S. Darwish
On Wed, Jul 15, 2020 at 02:54:07PM +0800, Leo Yan wrote: > On Wed, Jul 15, 2020 at 07:56:50AM +0200, Ahmed S. Darwish wrote: > > On Wed, Jul 15, 2020 at 10:05:07AM +0800, Leo Yan wrote: > > > From: Peter Zijlstra > > > > > ... > > > > > > Provide struct clock_read_data and two (seqcount) helpers s

Re: [PATCH v2 1/6] sched_clock: Expose struct clock_read_data

2020-07-14 Thread Leo Yan
On Wed, Jul 15, 2020 at 07:56:50AM +0200, Ahmed S. Darwish wrote: > On Wed, Jul 15, 2020 at 10:05:07AM +0800, Leo Yan wrote: > > From: Peter Zijlstra > > > ... > > > > Provide struct clock_read_data and two (seqcount) helpers so that > > architectures (arm64 in specific) can expose the numbers to

Re: [PATCH v2 1/6] sched_clock: Expose struct clock_read_data

2020-07-14 Thread Ahmed S. Darwish
On Wed, Jul 15, 2020 at 10:05:07AM +0800, Leo Yan wrote: > From: Peter Zijlstra > ... > > Provide struct clock_read_data and two (seqcount) helpers so that > architectures (arm64 in specific) can expose the numbers to userspace. > ... > > +struct clock_read_data *sched_clock_read_begin(unsigned in

[PATCH v2 1/6] sched_clock: Expose struct clock_read_data

2020-07-14 Thread Leo Yan
From: Peter Zijlstra In order to support perf_event_mmap_page::cap_time features, an architecture needs, aside from a userspace readable counter register, to expose the exact clock data so that userspace can convert the counter register into a correct timestamp. Provide struct clock_read_data an