lkml.org 
[lkml]   [2006]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: SPAM: Re: [patch 6/6] mm: fix pagecache write deadlocks
On Sun, Oct 15, 2006 at 03:51:09PM +0200, Peter Zijlstra wrote:
>
> > >
> > > Why use raw {inc,dec}_preempt_count() and not
> > > preempt_{disable,enable}()? Is the compiler barrier not needed here? And
> > > do we really want to avoid the preempt_check_resched()?
> >
> > Counter to intuition, we actually don't mind being preempted here,
> > but we do mind entering the (core) pagefault handler. Incrementing
> > the preempt count causes the arch specific handler to bail out early
> > before it takes any locks.
> >
> > Clear as mud? Wrapping it in a better name might be an improvement?
> > Or wrapping it into the copy*user_atomic functions themselves (which
> > is AFAIK the only place we use it).
>
> Right, but since you do inc the preempt_count you do disable preemption,
> might as well check TIF_NEED_RESCHED when enabling preemption again.

Yeah, you are right about that. Unfortunately there isn't a good
way to do this at the moment... well we could disable preempt
around the section, but that would be silly for a PREEMPT kernel.

And we should really decouple it from preempt entirely, in case we
ever want to check for it some other way in the pagefault handler.

-
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/

\
 
 \ /
  Last update: 2006-10-15 16:23    [W:0.047 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site