All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jay Lan <jlan@engr.sgi.com>
To: Andrew Morton <akpm@osdl.org>
Cc: lse-tech@lists.sourceforge.net, linux-kernel@vger.kernel.org,
	guillaume.thouvenin@bull.net
Subject: Re: [Lse-tech] [PATCH 2.6.9 1/2] enhanced accounting data collection
Date: Thu, 04 Nov 2004 15:48:02 -0800	[thread overview]
Message-ID: <418ABFB2.6050800@engr.sgi.com> (raw)
In-Reply-To: <20041021191608.06b74417.akpm@osdl.org>

Andrew Morton wrote:
> Jay Lan <jlan@engr.sgi.com> wrote:
> 
>>1/2: acct_io
>>
>>Enahanced I/O accounting data collection.
>>
> 
> 
> It's nice to use `diff -p' so people can see what functions you're hitting.

Will be done that way next time.

> 
> 
>>+			current->syscr++;
> 
> 
> Should these metrics be per-thread or per-heavyweight process?

Our customers found it useful per process.

> 
> 
>>+	if (ret > 0) {
>>+		current->rchar += ret;
>>+	}
> 
> 
> It's conventional to omit the braces if there is only one statement in the
> block.

Fixed. Also a few other places in the same siutation.

> 
> 
>>===================================================================
>>--- linux.orig/include/linux/sched.h	2004-10-01 17:01:21.412848229 -0700
>>+++ linux/include/linux/sched.h	2004-10-01 17:09:42.723482260 -0700
>>@@ -591,6 +591,9 @@
>> 	struct rw_semaphore pagg_sem;
> 
> 
> There is no `pagg_sem' in the kernel, so this will spit a reject.

Fixed. That was from pagg, but i should not assume that.

> 
> 
>> #endif
>> 
>>+/* i/o counters(bytes read/written, #syscalls */
>>+	unsigned long rchar, wchar, syscr, syscw;
>>+
> 
> 
> These will overflow super-quick.  Shouldn't they be 64-bit?

You are correct. Thanks!

> 
> 
>>--- linux.orig/kernel/fork.c	2004-10-01 17:01:21.432379595 -0700
>>+++ linux/kernel/fork.c	2004-10-01 17:09:42.732271376 -0700
>>@@ -995,6 +995,7 @@
>> 	p->real_timer.data = (unsigned long) p;
>> 
>> 	p->utime = p->stime = 0;
>>+	p->rchar = p->wchar = p->syscr = p->syscw = 0;
> 
> 
> We generally prefer
> 
> 	p->rchar = 0;
> 	p->wchar = 0;
> 	etc.
> 
> yes, the code which is there has already sinned - feel free to clean it up
> while you're there ;)

Will be corrected.

Thanks,
  - jay

> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
> Use IT products in your business? Tell us what you think of them. Give us
> Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
> http://productguide.itmanagersjournal.com/guidepromo.tmpl
> _______________________________________________
> Lse-tech mailing list
> Lse-tech@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lse-tech


  reply	other threads:[~2004-11-04 23:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-22  1:18 [PATCH 2.6.9 0/2] enhanced accounting data collection Jay Lan
2004-10-22  1:32 ` [Lse-tech] [PATCH 2.6.9 1/2] " Jay Lan
2004-10-22  2:16   ` Andrew Morton
2004-11-04 23:48     ` Jay Lan [this message]
2004-10-22  1:35 ` [Lse-tech] [PATCH 2.6.9 2/2] " Jay Lan
2004-10-22  2:25   ` Andrew Morton
2004-11-04 23:54     ` Jay Lan
2004-10-22  2:11 ` [PATCH 2.6.9 0/2] " Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=418ABFB2.6050800@engr.sgi.com \
    --to=jlan@engr.sgi.com \
    --cc=akpm@osdl.org \
    --cc=guillaume.thouvenin@bull.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lse-tech@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.