On Fri, 2023-09-22 at 14:41 +0100, Anton Ivanov wrote: > On 22/09/2023 12:16, Johannes Berg wrote: > > From: Johannes Berg <johannes.b...@intel.com> > > > > While enabling PREEMPT on UML, we found that the call to > > force_flush_all() cannot be done where it is, it sleeps > > while atomic. > > > > Further investigation shows that all this seems at least > > a bit roundabout and possibly wrong wrong in the first > > place - we copy from the 'current' process and then flush > > when it starts running. > > > > What we really want is to start fresh with an empty mm > > process, then have it all set up by the kernel (copying > > the original mm contents as needed), and then sync it > > in arch_dup_mmap(). > > Is there a way we can come up with COW here?
Well, I kind of thought we _did_ if we have arch_dup_mmap()? Need to understand this better. > > > > We should do the same for the LDT, so need to split that > > to be able to do this. > > > > Note that this fixes what seems like an issue - we look > > at current->mm when we copy, but that doesn't seem right > > in the case of clone() without copying the MM. This is > > probably saved by the forced flush later right now. > > We will need to work on this. > > It is nearly twice slower than the current approach on a find /usr -type f > -exec cat {} > /dev/null \; Hm, that's annoying. Guess I have to figure out why. johannes _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um