Re: [GIT PULL URGENT] ext4 regression fix for 3.9

Linus Torvalds
2013-03-02T19:54:40Z

On Thu, Feb 28, 2013 at 8:00 PM, Theodore Ts'o <tytso@mit.edu> wrote:
>
> ext4_es_reclaim_extents_count() is getting called out of the slab
> shrinker. It's getting called too often when there is significant
> memory pressure. We can optimize this so we're not calculating it all
> the time.

This needs to be fixed or reverted. I traced back some user
interaction problems to this same issue. It literally gets so bad that
the whole system is choppy, and a profile shows that a lot of time is
being spent in the spin-lock protecting these data structures. Called
from ext4_es_reclaim_extents_count, ext4_es_lru_add and
ext4_es_shrink.

We're talking very user-noticeable pauses, so it's not just the
spinlock, there's some real badness that comes in with it too.
Possibly related to other (sleeping) locks being held while the data
structures are then refilled or something.

Linus