Re: [PATCH 1/1] vmalloc: purge_fragmented_blocks: Acquire spinlockbefore reading vmap_block
From: Kautuk Consul
Date: Thu Dec 08 2011 - 02:26:23 EST
>
> That's intentional as an optimization, we don't care if
> vb->free + vb->dirty == VMAP_BBMAP_BITS && vb->dirty != VMAP_BBMAP_BITS
> would speculatively be true after we grab vb->lock, we'll have to purge it
> next time instead. We certainly don't want to grab vb->lock for blocks
> that aren't candidates, so this optimization is a singificant speedup.
Ah, I agree.
Anyway, the probability of there being too many vmap_blocks being
missed due to concurrent changes
is not quite high, so I guess its okay that a few vmap_blocks get
purged next time.
Thanks.
--
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/