Messages in this thread | ![/](/images/icornerl.gif) | | From | Blaisorblade <> | Subject | Re: [PATCH 3/7] uml: make copy_*_user atomic | Date | Sun, 30 Apr 2006 17:32:56 +0200 |
| |
On Sunday 30 April 2006 16:16, Paolo 'Blaisorblade' Giarrusso wrote: > From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> > > Make __copy_*_user_inatomic really atomic to avoid "Sleeping function > called in atomic context" warnings, especially from futex code. > > This is made by adding another kmap_atomic slot and making copy_*_user_skas > use kmap_atomic; also copy_*_user() becomes atomic, but that's true and is > not a problem for i386 (and we can always add might_sleep there as done > elsewhere). For TT mode kmap is not used, so there's no need for this. > > I've had to use another slot since both KM_USER0 and KM_USER1 are used > elsewhere and could cause conflicts. Till now we reused the kmap_atomic > slot list from the subarch, but that's not needed as that list must contain > the common ones (used by generic code) + the ones used in architecture > specific code (and Uml till now used none); so I've taken the i386 one > after comparing it with ones from other archs, and added KM_UML_USERCOPY.
> Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Ok, I didn't want indeed to send this one _for merging_, even if I consider it correct and it indeed fixes the warnings; additionally, since HIGHMEM support is not very used (it's slow and less tested), there shouldn't be problems anyway.
Please keep it in -mm however, it should be ok and there it could get more exposure - and this is about interaction with the core kernel so it could get valid review from people outside UML.
Jeff, give a look to this one please. You need CONFIG_DEBUG_SPINLOCK_SLEEP and a futex user (for instance starting threaded apache inside the guest) to trigger the warnings. -- Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!". Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894) http://www.user-mode-linux.org/~blaisorblade Chiacchiera con i tuoi amici in tempo reale! http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |