lkml.org 
[lkml]   [2004]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 2.6.8.1] BSD accounting: update chars transferred value
On Wed, Sep 08, 2004 at 11:06:57AM +0200, Guillaume Thouvenin wrote:
> Hello,
>
> The goal of this patch is to improve BSD accounting by using what
> is done in the CSA into BSD accounting. The final goal is to have a
> uniform accounting structure.
>
> This patch updates information given by BSD accounting concerning
> bytes read and written. A field is already present in the BSD accounting
> structure but it is never updated. We don't add information about blocks
> read and written because, as it was discussed in previous email, the
> information is inaccurate. Most writes which are flushed delayed would
> get accounted to pdflushd. Thus, one solution to get this kind of
> information is to add counters when the write back is performed. The
> problem is that we don't know how to get information about the IID at
> the page level (ie from struct page). So we remove this information for
> the moment and it will be provided in another patch.
>
> Changelog:
>
> - Adds two counters in the task_struct (rchar, wchar)
> - Init fields during the creation of the process (during the fork)
> - File I/O operations are done through sys_read(), sys_write(),
> sys_readv(), sys_writev() and sys_sendfile(). Thus we increment
> counters into those functions except with sys_sendfile(). For the
> latter, the incrementation is done in the do_sendfile() because this
> routine be directly called from the return of sys_sendfile().

I think it should be done in vfs_readv/vfs_write. Else we'll miss the
updates from inekrnel consumers like nfsd.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:06    [W:0.039 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site