lkml.org 
[lkml]   [2015]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [v3, 3/3] MIPS: VDSO: Add implementations of gettimeofday() and clock_gettime()
On Thu, Oct 22, 2015 at 06:41:30PM -0700, Leonid Yegoshin wrote:

> You can not use R4K CP0_count in SMP (multicore) without core-specific
> adjustment.
> After first power-saving with core clock off or core down the values in
> CP0_count
> in different cores are absolutely different.
>
> Until you include in system a patch like
> http://patchwork.linux-mips.org/patch/10871/
>
> "MIPS: Setup an instruction emulation in VDSO protected page instead of
> user stack"
>
> which creates a per-thread memory and put into that memory an adjustment
> value
> (which can be changed during re-schedule to another core), the use of R4K
> counter is incorrect
> in SMP environment.
>
> Note: It is also possible to setup and maintain a per-core page with that
> value too as
> an alternative variant for adjustment.

The CPU hot plugging code is supposed to resychronize the counters when
a CPU is coming online again so that case should be handled. Beyond that
the r4k timer code in the kernel also doesn't support clock scaling
so I'm ok if the VDSO series doesn't support this properly.

Ralf


\
 
 \ /
  Last update: 2015-10-27 16:01    [W:0.143 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site