Re: [PATCH v5] um: Enable preemption in UML

2023-09-22 Thread Johannes Berg
On Fri, 2023-09-22 at 11:55 +0100, Anton Ivanov wrote: > On 22/09/2023 10:55, Johannes Berg wrote: > > On Fri, 2023-09-22 at 11:51 +0200, Johannes Berg wrote: > > > On Fri, 2023-09-22 at 10:19 +0100, Anton Ivanov wrote: > > > > > So maybe that works - perhaps with a big comment? > > > > Ack. Will a

Re: [PATCH v5] um: Enable preemption in UML

2023-09-22 Thread Anton Ivanov
On 22/09/2023 10:55, Johannes Berg wrote: On Fri, 2023-09-22 at 11:51 +0200, Johannes Berg wrote: On Fri, 2023-09-22 at 10:19 +0100, Anton Ivanov wrote: So maybe that works - perhaps with a big comment? Ack. Will add this to the patch and run it through its paces. We can also just get rid

Re: [PATCH v5] um: Enable preemption in UML

2023-09-22 Thread Johannes Berg
On Fri, 2023-09-22 at 11:51 +0200, Johannes Berg wrote: > On Fri, 2023-09-22 at 10:19 +0100, Anton Ivanov wrote: > > > > > > So maybe that works - perhaps with a big comment? > > > > Ack. Will add this to the patch and run it through its paces. > > > > We can also just get rid of it entirely: >

Re: [PATCH v5] um: Enable preemption in UML

2023-09-22 Thread Johannes Berg
On Fri, 2023-09-22 at 10:19 +0100, Anton Ivanov wrote: > > > > So maybe that works - perhaps with a big comment? > > Ack. Will add this to the patch and run it through its paces. > We can also just get rid of it entirely: diff --git a/arch/um/include/asm/mmu_context.h b/arch/um/include/asm/mm

Re: [PATCH v5] um: Enable preemption in UML

2023-09-22 Thread Anton Ivanov
On 22/09/2023 10:14, Johannes Berg wrote: On Fri, 2023-09-22 at 11:10 +0200, Johannes Berg wrote: On Fri, 2023-09-22 at 10:06 +0100, Anton Ivanov wrote: On 22/09/2023 09:41, Johannes Berg wrote: Yes, but when does the fork actually happen? Looking further at this, now I'm confused as to w

Re: [PATCH v5] um: Enable preemption in UML

2023-09-22 Thread Johannes Berg
On Fri, 2023-09-22 at 11:10 +0200, Johannes Berg wrote: > On Fri, 2023-09-22 at 10:06 +0100, Anton Ivanov wrote: > > On 22/09/2023 09:41, Johannes Berg wrote: > > > > Yes, but when does the fork actually happen? > > > > > > > Looking further at this, now I'm confused as to why it doesn't happen >

Re: [PATCH v5] um: Enable preemption in UML

2023-09-22 Thread Anton Ivanov
On 22/09/2023 10:04, Johannes Berg wrote: On Fri, 2023-09-22 at 10:43 +0200, Johannes Berg wrote: I think this has pretty much always been wrong, just now we actually notice it? Basically, when we create a new thread (really just mm I think), we say the first thing that has to run there is for

Re: [PATCH v5] um: Enable preemption in UML

2023-09-22 Thread Johannes Berg
On Fri, 2023-09-22 at 10:06 +0100, Anton Ivanov wrote: > On 22/09/2023 09:41, Johannes Berg wrote: > > > Yes, but when does the fork actually happen? > > > > > Looking further at this, now I'm confused as to why it doesn't happen > > _all_ the time. > > > > I think this has pretty much always bee

Re: [PATCH v5] um: Enable preemption in UML

2023-09-22 Thread Anton Ivanov
On 22/09/2023 09:41, Johannes Berg wrote: Yes, but when does the fork actually happen? Looking further at this, now I'm confused as to why it doesn't happen _all_ the time. I think this has pretty much always been wrong, just now we actually notice it? Basically, when we create a new thread

Re: [PATCH v5] um: Enable preemption in UML

2023-09-22 Thread Johannes Berg
On Fri, 2023-09-22 at 10:43 +0200, Johannes Berg wrote: > > > > I think this has pretty much always been wrong, just now we actually > > notice it? > > > > Basically, when we create a new thread (really just mm I think), we say > > the first thing that has to run there is fork_handler(), which >

Re: [PATCH v5] um: Enable preemption in UML

2023-09-22 Thread Johannes Berg
On Fri, 2023-09-22 at 10:41 +0200, Johannes Berg wrote: > > > > Yes, but when does the fork actually happen? > > > > Looking further at this, now I'm confused as to why it doesn't happen > _all_ the time. > > I think this has pretty much always been wrong, just now we actually > notice it? > >

Re: [PATCH v5] um: Enable preemption in UML

2023-09-22 Thread Johannes Berg
> > Yes, but when does the fork actually happen? > Looking further at this, now I'm confused as to why it doesn't happen _all_ the time. I think this has pretty much always been wrong, just now we actually notice it? Basically, when we create a new thread (really just mm I think), we say the f

Re: [PATCH v5] um: Enable preemption in UML

2023-09-22 Thread Anton Ivanov
On 22/09/2023 09:13, Johannes Berg wrote: On Fri, 2023-09-22 at 09:01 +0100, Anton Ivanov wrote: My favorite test which I run on all changes is: find /usr -type f -exec cat {} > /dev/null \; On Debian this forks /bin/cat for each file and does IO on it. That test passes here every time :( O

Re: [PATCH v5] um: Enable preemption in UML

2023-09-22 Thread Johannes Berg
On Fri, 2023-09-22 at 09:01 +0100, Anton Ivanov wrote: > > My favorite test which I run on all changes is: > > find /usr -type f -exec cat {} > /dev/null \; > > On Debian this forks /bin/cat for each file and does IO on it. That test > passes here every time :( Oh, apart from the splat, it all

Re: [PATCH v5] um: Enable preemption in UML

2023-09-22 Thread Anton Ivanov
On 22/09/2023 08:40, Johannes Berg wrote: On Fri, 2023-09-22 at 08:38 +0100, Anton Ivanov wrote: I had enabled CONFIG_DEBUG_ATOMIC_SLEEP because that's actually something I'd really like to have in our testing. But with that issue I don't even know how we get there really. It doesn't even hap

Re: [PATCH v5] um: Enable preemption in UML

2023-09-22 Thread Johannes Berg
On Fri, 2023-09-22 at 08:38 +0100, Anton Ivanov wrote: > > > > I had enabled CONFIG_DEBUG_ATOMIC_SLEEP because that's actually > > something I'd really like to have in our testing. > > > > But with that issue I don't even know how we get there really. It > > doesn't even happen every time we fork

Re: [PATCH v5] um: Enable preemption in UML

2023-09-22 Thread Anton Ivanov
On 22/09/2023 08:30, Johannes Berg wrote: On Fri, 2023-09-22 at 07:52 +0100, anton.iva...@cambridgegreys.com wrote: +++ b/arch/um/include/asm/processor-generic.h @@ -44,6 +44,9 @@ struct thread_struct { } cb; } u; } request; +#if defined(CONFIG_P

Re: [PATCH v5] um: Enable preemption in UML

2023-09-22 Thread Johannes Berg
On Fri, 2023-09-22 at 07:52 +0100, anton.iva...@cambridgegreys.com wrote: > > +++ b/arch/um/include/asm/processor-generic.h > @@ -44,6 +44,9 @@ struct thread_struct { > } cb; > } u; > } request; > +#if defined(CONFIG_PREEMPT) || defined(CONFIG_PREEMPT_VOLU

Re: [PATCH v5] um: Enable preemption in UML

2023-09-22 Thread Anton Ivanov
On 22/09/2023 08:27, Richard Weinberger wrote: - Ursprüngliche Mail - Von: "anton ivanov" An: "linux-um" CC: "Johannes Berg" , "richard" , "anton ivanov" Gesendet: Freitag, 22. September 2023 08:52:12 Betreff: [PATCH v5] um: Enable preemption in UML From: Anton Ivanov Preemption r

Re: [PATCH v5] um: Enable preemption in UML

2023-09-22 Thread Richard Weinberger
- Ursprüngliche Mail - > Von: "anton ivanov" > An: "linux-um" > CC: "Johannes Berg" , "richard" , > "anton ivanov" > > Gesendet: Freitag, 22. September 2023 08:52:12 > Betreff: [PATCH v5] um: Enable preemption in UML > From: Anton Ivanov > > Preemption requires saving/restoring FPU s