On Sun, May 19, 2013 at 08:34:04AM -0400, Steven Rostedt wrote: > On Sun, 2013-05-19 at 12:35 +0300, Michael S. Tsirkin wrote: > > > No, I was not assuming that. What I'm trying to say is that a caller > > that does something like this under a spinlock: > > preempt_disable > > pagefault_disable > > error = copy_to_user > > pagefault_enable > > preempt_enable_no_resched > > > > is not doing anything wrong and should not get a warning, > > as long as error is handled correctly later. > > Right? > > > > What I see wrong with the above is the preempt_enable_no_resched(). The > only place that should be ever used is right before a schedule(), as you > don't want to schedule twice (once for the preempt_enable() and then > again for the schedule itself). > > Remember, in -rt, a spin lock does not disable preemption. > > -- Steve Right but we need to keep it working on upstream as well. If I do preempt_enable under a spinlock upstream won't it try to sleep under spinlock? -- MST -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>