* RFC Per group orphan list
@ 2010-04-28 10:55 Dmitry Monakhov
2010-04-28 22:17 ` Jan Kara
0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Monakhov @ 2010-04-28 10:55 UTC (permalink / raw)
To: linux-ext4
Currently orphan list is global, which require per-sb mutex
to protect add/del from the list. But it is not really necessary.
Just think about it we have to add inode to orphan list for each
->write_begin call(for each page) if i_size will grow.
For example btrfs support per-ctree orphan list.
So IMHO per-group orphan list seems to be more natural here.
So my proposal is following:
1) Introduce new incompat feature for per-group orphan list.
2) Store per-group head of the list in group descriptor
(Where are several reserved fields in grp-desc).
3) Maintain per-group orphan which protected by per-group lst-mutex.
4) Let fsck to scan group descriptors after unclean umount.Since they
are close to each other performance penalty will be negligible.
Seems that development complexity of this feature is not too high,
what do you think.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: RFC Per group orphan list
2010-04-28 10:55 RFC Per group orphan list Dmitry Monakhov
@ 2010-04-28 22:17 ` Jan Kara
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2010-04-28 22:17 UTC (permalink / raw)
To: Dmitry Monakhov; +Cc: linux-ext4
Hi,
> Currently orphan list is global, which require per-sb mutex
> to protect add/del from the list. But it is not really necessary.
> Just think about it we have to add inode to orphan list for each
> ->write_begin call(for each page) if i_size will grow.
Really? I don't see we would add inode to orphan list on every
->write_begin. We only do it in case write fails (ENOSPC, page fault
or so) but that's not interesting performance wise. The place where
we do add inode to orphan list are truncate path and file extending
direct IO (which might be what you meant).
> For example btrfs support per-ctree orphan list.
> So IMHO per-group orphan list seems to be more natural here.
> So my proposal is following:
> 1) Introduce new incompat feature for per-group orphan list.
> 2) Store per-group head of the list in group descriptor
> (Where are several reserved fields in grp-desc).
> 3) Maintain per-group orphan which protected by per-group lst-mutex.
> 4) Let fsck to scan group descriptors after unclean umount.Since they
> are close to each other performance penalty will be negligible.
>
> Seems that development complexity of this feature is not too high,
> what do you think.
If you can show it helps in some reasonably realistic load - several direct
IO writers might be interesting, I think it might be worth it. OTOH it will
complicate orphan recovery because that would have to scan all group
descriptors (and there is lots of them on a few TB filesystem). But that will
be probably fine since most of them will have empty list.
Honza
--
Jan Kara <jack@suse.cz>
SuSE CR Labs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-04-28 22:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-28 10:55 RFC Per group orphan list Dmitry Monakhov
2010-04-28 22:17 ` 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).