Re: [RFC PATCH] cyclictest: Add skip_sec option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 20, 2025 at 12:56 AM Leonardo Bras <leobras@xxxxxxxxxx> wrote:
> @@ -637,20 +638,21 @@ static void *timerthread(void *param)
>         sigset_t sigset;
>         timer_t timer;
>         struct timespec now, next, interval, stop = { 0 };
>         struct itimerval itimer;
>         struct itimerspec tspec;
>         struct thread_stat *stat = par->stats;
>         int stopped = 0;
>         cpu_set_t mask;
>         pthread_t thread;
>         unsigned long smi_now, smi_old = 0;
> +       unsigned long skip_cycles = skip_sec * USEC_PER_SEC / par->interval;
>

BTW, I noticed this is not the best approach: in case cycles take
longer than the interval, we may be skipping longer than the
parameter. Will send a rfc v2 for taking time into account instead of
cycles.


Thanks!
Leo






[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux