lkml.org 
[lkml]   [2001]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [reiserfs-list] Re: [PATCH] Significant performace improvements on reiserfs systems
Andrew Morton writes:
> george anzinger wrote:
> >
> > ...
> > Actually, I rather think that the problem is lock granularity. These
> > issues are present in the SMP systems as well. A good solution would be
> > one that shortened the spinlock time. No horrid preempt code, just
> > tight fast code.
> >
>
> This may not be practical.
>
> Take, for example, zap_page_range(). It simply has a lot
> of work to do, and it does it inside a spinlock. By doing
> it in a tight loop, it's optimal.
>
> There is no way to speed this function up by two or three orders
> of magnitude. (Well, there is: don't take the lock at all if
> the mm isn't shared, but this is merely an example. There are
> other instances).
>
> It seems that for a preemptive kernel to be successful, we need
> to globally alter the kernel so that it never holds locks for
> more than 500 microseconds. Which is what the conditional_schedule()
> (aka cooperative multitasking :)) patches do.
>
> It seems that there are no magic bullets, and low latency will
> forever have a global impact on kernel design, unless a way is
> found to reschedule with locks held. I recall that a large

In Solaris, before spinning on a busy spin-lock, thread checks whether
spin-lock holder runs on the same processor. If so, thread goes to sleep
and holder wakes it up on spin-lock release. The same, I guess is going
for interrupts that are served as separate threads. This way, one can
re-schedule with spin-locks held.

> part of the MontaVista patch involved turning spinlocks into
> semaphores, yes? That would seem to be the way to go.

Nikita.
-
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: 2005-03-22 13:03    [W:0.121 / U:10.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site