[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080820193402.GG8109@mit.edu>
Date: Wed, 20 Aug 2008 15:34:02 -0400
From: Theodore Tso <tytso@....edu>
To: Andreas Dilger <adilger@....com>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>,
ext4 development <linux-ext4@...r.kernel.org>
Subject: Re: ENOSPC returned during writepages
On Wed, Aug 20, 2008 at 01:25:36PM -0600, Andreas Dilger wrote:
> What I think makes sense, however, is that if freeblocks < $threshold that
> a global spinlock is taken and the percpu_counter_sum() is done under the
> lock before deciding if enough space is left. Since it is impossible that
> the other CPUs get below -FBC_BATCH away from the correct free space they
> should all get the spinlock at the same time when we get too low.
Yep, I agree. I suggested something very similar as my first suggestion.
I do think though that we need to rationalize the percpu_counter
interface, though; those are two separable issues, and both IMHO need
fixing... The fact that we have a #ifdef CONFIG_SMP in
fs/ext4/inode.c and we are doing wierd things with percpu_counter_sum
and percpu_counter_sum_and_set is ugly. And it would be good if most
of the time we can avoid taking the filesystem-level spinlock, and
rely on the percpu_counter except when we start getting low on space.
- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists