Re: [PATCH] anobjrmap 9 priority mjb tree

From: Andrea Arcangeli
Date: Thu Apr 15 2004 - 07:54:23 EST


On Thu, Apr 15, 2004 at 11:26:09AM +0100, Hugh Dickins wrote:
> On Wed, 14 Apr 2004, Martin J. Bligh wrote:
> >
> > FYI, even without prio-tree, I get a 12% boost from converting i_shared_sem
> > into a spinlock. I'll try doing the same on top of prio-tree next.
>
> Good news, though not a surprise.
>
> Any ideas how we might handle latency from vmtruncate (and
> try_to_unmap) if using prio_tree with i_shared_lock spinlock?

we'd need to break the loop after need_resched returns 1 (and then the
second time we'd just screw the latency and go ahead). I also wanted to
make it a spinlock again like in 2.4, the semaphore probably generates
overscheduling. OTOH the spinlock saved some cpu in slightly different
workloads with big truncates (plus it made the cond_resched trivial w/o
requiring loop break) and I agree with Andrew about that, Martin isn't
benchmarking the other side, the one that made Andrew to change it to a
semaphore.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/