[Top] [All Lists]

Re: [Lse-tech] Re: [PATCH] new CSA patchset for 2.6.8

To: Tim Schmielau <tim@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [Lse-tech] Re: [PATCH] new CSA patchset for 2.6.8
From: Jay Lan <jlan@xxxxxxxxxxxx>
Date: Tue, 31 Aug 2004 16:01:02 -0700
Cc: Guillaume Thouvenin <guillaume.thouvenin@xxxxxxxx>, Arthur Corliss <corliss@xxxxxxxxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxx>, lkml <linux-kernel@xxxxxxxxxxxxxxx>, erikj@xxxxxxxxxxxxxxxxxx, limin@xxxxxxxxxxxx, lse-tech@xxxxxxxxxxxxxxxxxxxxx, ? <kernel@xxxxxxxxxxxxxxxxxxx>, Yoshitaka ISHIKAWA <y.ishikawa@xxxxxxxxxxxxxxxx>, csa@xxxxxxxxxxx
In-reply-to: <Pine.LNX.4.53.0408311611080.9018@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <412D2E10.8010406@xxxxxxxxxxxx> <20040825221842.72dd83a4.akpm@xxxxxxxx> <Pine.LNX.4.53.0408261821090.14826@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <Pine.LNX.4.58.0408261111520.22750@xxxxxxxxxxxxxxxxxxxxxxxx> <Pine.LNX.4.53.0408262133190.8515@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <412E4C27.1010805@xxxxxxxxxxxx> <Pine.LNX.4.58.0408271727020.1075@xxxxxxxxxxxxxxxxxxxxxxxx> <20040830122614.GA2518@xxxxxxxxxxxx> <Pine.LNX.4.53.0408311611080.9018@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: csa-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225
Adding csa@xxxxxxxxxxx, the CSA user group mailing list, to Cc.

Tim Schmielau wrote:
On Mon, 30 Aug 2004, Guillaume Thouvenin wrote:

 Thus, to be clear, the enhanced accounting can be divided into
three parts:

   1) A common data collection method in the kernel.
      We could start from BSD-accounting and add CSA information. Could
      it be something like BSD version4?

I've had a quick look at the CSA data collection patches. To get the discussion started, here are my comments:

--- linux.orig/drivers/block/ll_rw_blk.c        2004-08-13 22:36:16.000000000 
+++ linux/drivers/block/ll_rw_blk.c     2004-08-18 12:07:10.000000000 -0700
@@ -1948,10 +1950,12 @@

       if (rw == READ) {
               disk_stat_add(rq->rq_disk, read_sectors, nr_sectors);
+               current->rblk += nr_sectors;
               if (!new_io)
                       disk_stat_inc(rq->rq_disk, read_merges);
       } else if (rw == WRITE) {
               disk_stat_add(rq->rq_disk, write_sectors, nr_sectors);
+               current->wblk += nr_sectors;
               if (!new_io)
                       disk_stat_inc(rq->rq_disk, write_merges);

Andi Kleen's comment on the ELSA patch also applies here - most writes
will get accounted to pdflushd. See


for his comment.

I need more time on this. :)

--- /dev/null   1970-01-01 00:00:00.000000000 +0000
+++ linux/include/linux/csa_internal.h  2004-08-19 15:19:05.000000000 -0700


+#define csa_update_integrals()         do { } while (0);
+#define csa_clear_integrals(task)      do { } while (0);

I suppose the semicolons are unintentional.

Good catch! I fixed this in our internal tree.

--- linux.orig/include/linux/sched.h    2004-08-19 15:17:52.000000000 -0700
+++ linux/include/linux/sched.h 2004-08-19 15:19:05.000000000 -0700


@@ -525,6 +527,10 @@

/* i/o counters(bytes read/written, blocks read/written, #syscalls, waittime */
        unsigned long rchar, wchar, rblk, wblk, syscr, syscw, bwtime;
+#if defined(CONFIG_CSA) || defined(CONFIG_CSA_MODULE)
+       unsigned long csa_rss_mem1, csa_vm_mem1;
+       clock_t csa_stimexpd;

These probably need to be u64, otherwise they might easily overflow within
a view seconds on 32 bit platforms.

Will fix it.

--- /dev/null   1970-01-01 00:00:00.000000000 +0000
+++ linux/include/linux/acct_eop.h      2004-08-19 18:48:44.000000000 -0700

This should probably be unified with BSD accounting to a general accounting

Do you suggest to merge acct_eop.h into acct.h? It sounds good to me!

 - jay


This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
Lse-tech mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Lse-tech] Re: [PATCH] new CSA patchset for 2.6.8, Jay Lan <=