lkml.org 
[lkml]   [2004]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Locking optimization for cache_reap
On Mon, Jul 26, 2004 at 06:01:04PM -0700, Andrew Morton wrote:
> Dimitri Sivanich <sivanich@sgi.com> wrote:
> >
> > Here is another cache_reap optimization that reduces latency when
> > applied after the 'Move cache_reap out of timer context' patch I
> > submitted on 7/14 (for inclusion in -mm next week).
> >
> > This applies to 2.6.8-rc2 + the above mentioned patch.
>
> How does it "reduce latency"?
>
> It looks like a reasonable cleanup, but afaict it will result in the
> per-cache spinlock actually being held for longer periods, thus increasing
> latencies???
>

While you've got irq's disabled, drain_array() (the function my patch removes)
acquires the cache spin_lock, then releases it. Cache_reap then acquires
it again (with irq's having been off the entire time). My testing has found
that simply acquiring the lock once while irq's are off results in fewer
excessively long latencies.

Results probably vary somewhat depending on the circumstance.
-
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 14:04    [W:1.053 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site