Re: Tracking actual disk write sources instead of flush thread

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 04/23/2014 07:19 PM, Andreas Dilger wrote:
> I think that adding a pointer or integer per page would meet
> resistance, but I think it is pretty reasonable to track this on a
> per-inode basis. It is fairly uncommon to have multiple threads
> writing to the same file, and I would guess it is vanishingly rare
> that different applications are writing to the same file at one
> time.

Wherever the current counter is should be fine, the question is when
it gets updated.  Rather than updating it on sync it just needs
updated on actual write() / page dirty.

> Storing {current->comm}.{pid} would take 20 bytes of space per
> inode, but would be much more useful than just storing {pid}, since
> a process may be long gone by the time that the blocks are even
> submitted to disk due to delayed allocation and such.
> 
> It would be possible to store a refcounted struct with this info
> pointed to from the inode, since it would only be useful on inodes
> being written, but that has to be balanced against the complexity
> of maintaining that struct and the potential of saving 12 bytes per
> inode (since there would still need to be a pointer in the inode).

That might be a bit overkill.  I believe the current interface just
has a counter of bytes of IO hung off the task, so you can't catch
very short lived processes.  That's probably not too bad.  I don't
think it needs tracked on a per inode basis; just being able to sort
out that this process is doing the writing instead of some other
random process or the flush task that actually ends up submitting the bio.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCgAGBQJTWGs7AAoJEI5FoCIzSKrwbiUH/iCQYRn74zTt/G1pSVEKiNCj
+j0AL004tkU8UHZkgUvTedYzMyaqy5gs59IahwuPX+u/U6jRIUElrkBpecL5E+q/
OgfL+g/HybC0YbMJDKWedjRshxwHyjLLhRuPxTPSLXLxOPj8ZCvhzg2Hc2UkswJ5
/mIiWlKt70Ezxf2sq4Xnna8nGk6iuTlNqCc/VkB/AOu+aSsYcdIkoi1T/O+vUMHz
uRUwVuo+grn85NdRjpL0l7sXT1FJaJsbQkjy72akiBEDWN4J/3w48ZaoHr1Gv7tB
uCgWmZgPdQYeftkK0gnU7MSbWplcr7VrwdnYr9BdzEluKaX6I0vxejbpPYcAwOo=
=p1rv
-----END PGP SIGNATURE-----
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux