Re: Strange load spikes on 2.4.19 kernel

From: Andrew Morton (akpm@digeo.com)
Date: Sun Oct 13 2002 - 13:29:58 EST


Hugh Dickins wrote:
>
> On 13 Oct 2002, Andi Kleen wrote:
> >
> > Still in 2.4 the VFS takes the big kernel lock unnecessarily for
> > a few VFS operations (no matter if the underlying FS needs it or not).
> > That's fixed in 2.5.
>
> Something I was a bit surprised to notice recently: 2.5 still holds
> big kernel lock around the potentially very lengthy vmtruncate() -
> is that one still really necessary at VFS level?
>

eww.. Truncating 1G of pagecache takes 2.5 seconds on my testbox.
Probably 4 seconds if that pagecache got there via write() (need to
crunch on buffer_heads as well).

There's a cond_resched() after every 16th page in truncate_inode_pages(),
so it won't be very visible to humans. But a multi-second holdtime is
rather rude.

Certainly we don't need to hold it across truncate_inode_pages(), which
is where the heavy lifting happens. Probably, we can just push it down
to vmtruncate(), around the i_op->truncate() callout.

But as ever, it's not really clear what the thing is protecting.
-
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/



This archive was generated by hypermail 2b29 : Tue Oct 15 2002 - 22:00:46 EST