* quota tests
@ 2011-09-06 12:21 Christoph Hellwig
2011-09-06 14:43 ` Jan Kara
0 siblings, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2011-09-06 12:21 UTC (permalink / raw)
To: Jan Kara; +Cc: linux-fsdevel
Hi Jan,
do you have some quota test scripts? I've noticed that the quota
testing in xfstests really isn't as good as it should be and I'm
looking for more existing tests I can integrated before writing new
ones from scratch.
Anyone else who could provide quota test scripts / tools under GPLv2
or more permissive licenses is of course welcome as well.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: quota tests
2011-09-06 12:21 quota tests Christoph Hellwig
@ 2011-09-06 14:43 ` Jan Kara
2011-09-06 14:50 ` Christoph Hellwig
2011-09-06 14:50 ` Jan Kara
0 siblings, 2 replies; 6+ messages in thread
From: Jan Kara @ 2011-09-06 14:43 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Jan Kara, linux-fsdevel
Hi,
On Tue 06-09-11 08:21:16, Christoph Hellwig wrote:
> do you have some quota test scripts? I've noticed that the quota
> testing in xfstests really isn't as good as it should be and I'm
> looking for more existing tests I can integrated before writing new
> ones from scratch.
All I had (well, except a tool which verifies sanity of quotactl syscall
but that's out of scope for xfstests I'd say) is already integrated into
xfstests.
We have test 219 which tests whether quota measures something sane.
Test 230 tries to exceed various quota limits and checks that it fails
roughly at the right moment.
Tests 231 and 232 check that if we stress the filesystem (fsx, fsstress),
the resulting quota usage is indeed what we get when we sum up the usage
using quotacheck (which is worthless for XFS but for ext? filesystems this
is really useful).
Test 233 checks running fsstress with quotas set low so that we often hit
EDQUOT. We also verify that usage matches what quotacheck gets.
Finally test 234 stresses operations on top of quota files by adding and
removing quota structures by setquota from several processes.
What other tests would you like to have?
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: quota tests
2011-09-06 14:43 ` Jan Kara
@ 2011-09-06 14:50 ` Christoph Hellwig
2011-09-06 15:12 ` Jan Kara
2011-09-06 14:50 ` Jan Kara
1 sibling, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2011-09-06 14:50 UTC (permalink / raw)
To: Jan Kara; +Cc: Christoph Hellwig, linux-fsdevel
On Tue, Sep 06, 2011 at 04:43:34PM +0200, Jan Kara wrote:
> All I had (well, except a tool which verifies sanity of quotactl syscall
> but that's out of scope for xfstests I'd say) is already integrated into
> xfstests.
>
> We have test 219 which tests whether quota measures something sane.
> Test 230 tries to exceed various quota limits and checks that it fails
> roughly at the right moment.
> Tests 231 and 232 check that if we stress the filesystem (fsx, fsstress),
> the resulting quota usage is indeed what we get when we sum up the usage
> using quotacheck (which is worthless for XFS but for ext? filesystems this
> is really useful).
> Test 233 checks running fsstress with quotas set low so that we often hit
> EDQUOT. We also verify that usage matches what quotacheck gets.
> Finally test 234 stresses operations on top of quota files by adding and
> removing quota structures by setquota from several processes.
>
> What other tests would you like to have?
In XFS we have a few counters for evens in the quota code, and I noticed
that we're barely ever hitting reclaim of dquots due to memory pressure,
not do we ever see racing quota lookups. So one thing I'd like to to
is all kinds of heavy fs stressing with quotas enabled. One option is
to simply run all of xfstests with quotas enabled, which I already did,
but I'm still not hitting any of these above.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: quota tests
2011-09-06 14:50 ` Christoph Hellwig
@ 2011-09-06 15:12 ` Jan Kara
2011-09-06 15:15 ` Christoph Hellwig
0 siblings, 1 reply; 6+ messages in thread
From: Jan Kara @ 2011-09-06 15:12 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Jan Kara, linux-fsdevel
On Tue 06-09-11 10:50:09, Christoph Hellwig wrote:
> On Tue, Sep 06, 2011 at 04:43:34PM +0200, Jan Kara wrote:
> > All I had (well, except a tool which verifies sanity of quotactl syscall
> > but that's out of scope for xfstests I'd say) is already integrated into
> > xfstests.
> >
> > We have test 219 which tests whether quota measures something sane.
> > Test 230 tries to exceed various quota limits and checks that it fails
> > roughly at the right moment.
> > Tests 231 and 232 check that if we stress the filesystem (fsx, fsstress),
> > the resulting quota usage is indeed what we get when we sum up the usage
> > using quotacheck (which is worthless for XFS but for ext? filesystems this
> > is really useful).
> > Test 233 checks running fsstress with quotas set low so that we often hit
> > EDQUOT. We also verify that usage matches what quotacheck gets.
> > Finally test 234 stresses operations on top of quota files by adding and
> > removing quota structures by setquota from several processes.
> >
> > What other tests would you like to have?
>
> In XFS we have a few counters for evens in the quota code, and I noticed
> that we're barely ever hitting reclaim of dquots due to memory pressure,
> not do we ever see racing quota lookups. So one thing I'd like to to
> is all kinds of heavy fs stressing with quotas enabled. One option is
> to simply run all of xfstests with quotas enabled, which I already did,
> but I'm still not hitting any of these above.
That's a good plan.
To verify reclaim behavior for VFS quotas, we could pull quota structures
in memory using GETQUOTA and then apply memory pressure to have them
reclaimed. If we also want to combine this with updates to those structures
because of allocations it gets more complicated. We'd have to do IO for
several different users in sequence under memory pressure so that all
inodes of one user get pushed out of memory and quota structure is thus
freed for reclaim as well.
As for racing lookups / other quota operations - these are not that
much interesting for VFS quotas because
a) once quota structure is created, it's position on disk is fixed
b) any operation on quota file that does more than update accounting
information in a structure is protected by per quota-file mutex.
c) in memory operations with quota structures are protected by one global
spinlock
So there is no paralelism to worry about. But sure it's good to verify this
by pushing the filesystem as hard as possible :-).
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: quota tests
2011-09-06 15:12 ` Jan Kara
@ 2011-09-06 15:15 ` Christoph Hellwig
0 siblings, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2011-09-06 15:15 UTC (permalink / raw)
To: Jan Kara; +Cc: Christoph Hellwig, linux-fsdevel
On Tue, Sep 06, 2011 at 05:12:36PM +0200, Jan Kara wrote:
> To verify reclaim behavior for VFS quotas, we could pull quota structures
> in memory using GETQUOTA and then apply memory pressure to have them
> reclaimed. If we also want to combine this with updates to those structures
> because of allocations it gets more complicated. We'd have to do IO for
> several different users in sequence under memory pressure so that all
> inodes of one user get pushed out of memory and quota structure is thus
> freed for reclaim as well.
>
> As for racing lookups / other quota operations - these are not that
> much interesting for VFS quotas because
> a) once quota structure is created, it's position on disk is fixed
> b) any operation on quota file that does more than update accounting
> information in a structure is protected by per quota-file mutex.
> c) in memory operations with quota structures are protected by one global
> spinlock
It's fairly similar for XFS - but we still have code to e.g. retry the
lookup after we did a memory allocation in both quota implementation.
I just change the way the one in XFS worked, so I'm looking for a way
to actually test that path.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: quota tests
2011-09-06 14:43 ` Jan Kara
2011-09-06 14:50 ` Christoph Hellwig
@ 2011-09-06 14:50 ` Jan Kara
1 sibling, 0 replies; 6+ messages in thread
From: Jan Kara @ 2011-09-06 14:50 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Jan Kara, linux-fsdevel
On Tue 06-09-11 16:43:34, Jan Kara wrote:
> On Tue 06-09-11 08:21:16, Christoph Hellwig wrote:
> > do you have some quota test scripts? I've noticed that the quota
> > testing in xfstests really isn't as good as it should be and I'm
> > looking for more existing tests I can integrated before writing new
> > ones from scratch.
> All I had (well, except a tool which verifies sanity of quotactl syscall
> but that's out of scope for xfstests I'd say) is already integrated into
> xfstests.
>
> We have test 219 which tests whether quota measures something sane.
> Test 230 tries to exceed various quota limits and checks that it fails
> roughly at the right moment.
> Tests 231 and 232 check that if we stress the filesystem (fsx, fsstress),
> the resulting quota usage is indeed what we get when we sum up the usage
> using quotacheck (which is worthless for XFS but for ext? filesystems this
> is really useful).
> Test 233 checks running fsstress with quotas set low so that we often hit
> EDQUOT. We also verify that usage matches what quotacheck gets.
> Finally test 234 stresses operations on top of quota files by adding and
> removing quota structures by setquota from several processes.
Oh, and we have test 235 which checks whether quota gets properly
suspended during remount read-only and reenabled during remount read-write.
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-09-06 15:15 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-06 12:21 quota tests Christoph Hellwig
2011-09-06 14:43 ` Jan Kara
2011-09-06 14:50 ` Christoph Hellwig
2011-09-06 15:12 ` Jan Kara
2011-09-06 15:15 ` Christoph Hellwig
2011-09-06 14:50 ` Jan Kara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).