Re: 23 second kernel compile / pagemap_lru_lock improvement

Martin J. Bligh (Martin.Bligh@us.ibm.com)
Wed, 13 Mar 2002 14:40:02 -0800


>> >>>> Linus:
>> >>>>
>> >>>> Anyway, some obvious LRU lock improvements are clearly available:
>> >>>> activate_page_nolock() shouldn't even need to take the lru lock if the
>> >>>> page is already active.
>>
>> Your suggestion seems to improve the pagemap_lru_lock contention a little:
>> (make bzImage , 16 way NUMA-Q, 5 runs each)
>
> I'm surprised it made any difference at all, I think the patch mainly

There's quite a bit of variablility between runs, so it's a little hard to pin
down. The number of locks taken doesn't seem to be affected much, and
that's probably the best indicator of whether this is really working.

> adds more tests: activate_page is only called from mark_page_accessed
> (after testing !PageActive) and from fail_writepage (where usually
> !PageActive). I don't think many !PageLRU pages can get there.
> Or is activate_page being called from other places in your tree?

No, I don't think I'm doing other stranger things to activate_page.

It does seem distinctly odd that we take the lock, *then* test whether
we actually need to do anything. Is the test just a sanity check that
should never fail?

M.

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