On Tue 06-11-07 14:40:12, Theodore Tso wrote:That should be fine - let's see: Each application keeps somewhere a time when it started a scan of a subtree (or it can actually remember a time when it set the flag for each directory), during the scan, it sets the flag on each directory. When it wakes up to recheck the subtree it just compares the rtime against the stored time - if rtime is greater, subtree has been modified since the last scan and we recurse in it and when we are finished with it we set the flag. Now notice that we don't care about the flag when we check for changes - we care only for rtime - so if there are several applications interested in the same subtree, the flag just gets set more often and thus the update of rtime happens more often but the same scheme still works fine. I don't get it here - you need to scan the whole subtree and set the flag only during the initial scan. Later, you need to scan and set the flag only for directories in whose subtree something changed. Similarty rtime needs to be updated for each inode at most once after the scan. Maybe we have different different ideas of use-cases: I consider this useful for larger subtrees which change only seldom (or only their small parts) or you want to check for changes only once per some longer time - so uses like backup with rsync, updatedb, cachefiles for trees with config files (like KDE has) etc. There the penalty for additional IO is during rtime updates is quite negligible - if you have some usecase you'd like to measure, please propose it and I'll measure it. I have tested the following: Create a tree of depth 5 where each directory has 5 subdirectories and the leaf directories have 10 files in it. You set the flag on all directories (umount and mount again) and then touch one file in every directory. With the feature enabled this takes 36.1176s (average from 5 tests) with deviation 0.29509. Without the feature it takes 35.75480 with deviation 0.15433. So the difference in performance is 1% which is just slightly above the error and I'd find this test case quite pesimistic for the intended usage... I don't quite understand what you are afraid here - I think we misunderstand a bit - are you aware that we don't propagate the modification up once we hit a directory with a flag not set - hence all possible updates in future will write each inode at most once? I hope I've refuted most of your objections ;) Thanks for having look at the feature. Honza -- Jan Kara <jack@suse.cz> SUSE Labs, CR -
| Jesse Barnes | Re: [stable] [BUG][PATCH] cpqphp: fix kernel NULL pointer dereference |
| Greg KH | [003/136] p54usb: add Zcomax XG-705A usbid |
| Magnus Damm | [PATCH 03/07] ARM: Use shared GIC entry macros on Realview |
| Oliver Neukum | Re: [Bug #13682] The webcam stopped working when upgrading from 2.6.29 to 2.6.30 |
| Martin Schwidefsky | Re: [PATCH] optimized ktime_get[_ts] for GENERIC_TIME=y |
git: | |
| Junio C Hamano | Re: Some advanced index playing |
| Jeff King | Re: confusion over the new branch and merge config |
| Robin Rosenberg | Re: cvs2svn conversion directly to git ready for experimentation |
| Linus Torvalds | git binary size... |
| Ævar Arnfjörð Bjarmason | Re: Challenge with Git-Bash |
| Linux Kernel Mailing List | md: move allocation of ->queue from mddev_find to md_probe |
| Linux Kernel Mailing List | md: raid0: Represent zone->zone_offset in sectors. |
| Linux Kernel Mailing List | [ARM] S3C24XX: Add gpio_to_irq() facility |
| Linux Kernel Mailing List | md: raid0_make_ |
