Re: [PATCH] um: time-travel: fix time going backwards

From: Johannes Berg
Date: Wed Oct 25 2023 - 16:41:45 EST


On Wed, 2023-10-25 at 22:02 +0200, Johannes Berg wrote:
> On Wed, 2023-10-25 at 21:51 +0200, Johannes Berg wrote:
> > On Wed, 2023-10-25 at 11:55 +0000, Vincent Whitchurch wrote:
> > > On Mon, 2023-10-23 at 09:33 +0200, Johannes Berg wrote:
> > > > Do you have a specific workload that tends to reproduce this?
> > >
> > > I've been seeing it when running roadtest, but it's easily reproducible
> > > without that by using the attached config and the following program as
> > > init.
> > >
> > > cp repro.config .config
> > > make ARCH=um olddefconfig all
> > > gcc -Wall -static -o repro repro.c
> > > ./linux time-travel init=$PWD/repro rootfstype=hostfs
>
> Ohhh.
>
> Pure "time-travel" is actually something I hardly think about these
> days, we mostly use time-travel=inf-cpu (or =ext).
>
> That makes sense, here you actually *can* get interrupted. I'll need to
> dig into what happens though.

I just sent a patch, please take a look. It does seem to fix it - at
least I got bored of waiting after running your test program for a few
minutes :)

johannes