All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shailabh Nagar <nagar@watson.ibm.com>
To: Jes Sorensen <jes@sgi.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Arjan van de Ven <arjan@infradead.org>
Subject: Re: Patch 2/9] Initialization
Date: Tue, 14 Mar 2006 10:20:42 -0500	[thread overview]
Message-ID: <4416DF4A.7040908@watson.ibm.com> (raw)
In-Reply-To: <yq0slpluwi1.fsf@jaguar.mkp.net>

Jes Sorensen wrote:

>>>>>>"Shailabh" == Shailabh Nagar <nagar@watson.ibm.com> writes:
>>>>>>            
>>>>>>
>
>Shailabh> delayacct-setup.patch Initialization code related to
>Shailabh> collection of per-task "delay" statistics which measure how
>Shailabh> long it had to wait for cpu, sync block io, swapping
>Shailabh> etc. The collection of statistics and the interface are in
>Shailabh> other patches. This patch sets up the data structures and
>Shailabh> allows the statistics collection to be disabled through a
>Shailabh> kernel boot paramater.
>
>Shailabh> +#ifdef CONFIG_TASK_DELAY_ACCT
>Shailabh> +struct task_delay_info {
>Shailabh> +	spinlock_t	lock;
>Shailabh> +
>Shailabh> +	/* For each stat XXX, add following, aligned appropriately
>Shailabh> +	 *
>Shailabh> +	 * struct timespec XXX_start, XXX_end;
>Shailabh> +	 * u64 XXX_delay;
>Shailabh> +	 * u32 XXX_count;
>Shailabh> +	 */
>Shailabh> +};
>Shailabh> +#endif
>
>Hmmm
>
>I thought you were going to change this to do
>
>u64 some_delay
>u32 foo_count
>u32 bar_count
>u64 another_delay
>
>To avoid wasting space on 64 bit platforms.
>  
>

Well, the "aligned appropriately" part of the comment was intended to let
future users know that something like the above should be done.

e.g in a subsequent patch (5/9)
http://www.uwsg.indiana.edu/hypermail/linux/kernel/0603.1/1919.html
when we introduce the additional stat swapin_delay/count, a 64-bit friendly
alignment is being done thus:

u64 blkio_delay; /* wait for sync block io completion */
+ u64 swapin_delay; /* wait for sync block io completion */
u32 blkio_count;
+ u32 swapin_count;

The need for each stat, potentially, to need a separate set of timespec 
variables
to reduce nesting problems does introduce another wrinkle in 
cache-friendliness
since you'd ideally like to have all the XXX_* variables close together. 
Right now
we're good since swapin doesn't need extra timespecs of its own. But future
additions might need to be more careful.

--Shailabh


>Jes
>  
>


  reply	other threads:[~2006-03-14 15:20 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-14  0:40 [Patch 0/9] Per-task delay accounting Shailabh Nagar
2006-03-14  0:42 ` [Patch 1/9] timestamp diff Shailabh Nagar
2006-03-14  1:01   ` Lee Revell
2006-03-14  1:05     ` Shailabh Nagar
2006-03-14  1:12       ` Lee Revell
2006-03-14  3:42         ` Balbir Singh
2006-03-14  4:26           ` Shailabh Nagar
2006-03-14  6:50             ` Balbir Singh
2006-03-15 10:23   ` Arjan van de Ven
2006-03-15 10:28     ` Balbir Singh
2006-03-14  0:45 ` Patch 2/9] Initialization Shailabh Nagar
2006-03-14 10:54   ` Jes Sorensen
2006-03-14 15:20     ` Shailabh Nagar [this message]
2006-03-15 10:24   ` Arjan van de Ven
2006-03-15 12:37     ` Alan Cox
2006-03-15 15:53       ` Shailabh Nagar
2006-03-14  0:47 ` [Patch 3/9] Block I/O accounting initialization Shailabh Nagar
2006-03-15 10:27   ` Arjan van de Ven
2006-03-15 16:27     ` Shailabh Nagar
2006-03-14  0:48 ` [Patch 4/9] Block I/O accounting collection Shailabh Nagar
2006-03-14  0:51 ` [Patch 5/9] Swapin delays Shailabh Nagar
2006-03-14  0:53 ` [Patch 7/9] /proc interface for all I/O delays Shailabh Nagar
2006-03-14  0:55 ` [Patch 8/9] generic netlink utility functions Shailabh Nagar
2006-03-26 16:44   ` Balbir Singh
2006-03-26 17:06     ` jamal
2006-03-14  0:56 ` [Patch 9/9] Generic netlink interface for delay accounting Shailabh Nagar
2006-03-14  2:29   ` jamal
2006-03-14  2:33   ` Matt Helsley
2006-03-14  2:48     ` jamal
2006-03-14  4:18       ` Shailabh Nagar
2006-03-22  7:49       ` [RFC][UPDATED PATCH 2.6.16] " Balbir Singh
2006-03-23 14:04         ` jamal
2006-03-23 15:41           ` Balbir Singh
2006-03-24 14:04             ` jamal
2006-03-24 14:54               ` Balbir Singh
2006-03-25  1:19                 ` jamal
2006-03-25  9:41                   ` Balbir Singh
2006-03-25 12:52                     ` jamal
2006-03-25 15:36                       ` Balbir Singh
2006-03-25 17:48                         ` jamal
2006-03-25 18:22                           ` Balbir Singh
2006-03-26 14:05                             ` jamal
2006-03-26 16:40                               ` Balbir Singh
2006-03-24  1:32           ` Balbir Singh
2006-03-24 14:11             ` jamal
2006-03-24 14:19               ` jamal
2006-03-24 14:59               ` Balbir Singh
2006-03-14  4:29     ` Shailabh Nagar
2006-03-14  1:01 ` [Patch 6/9] cpu delay collection Shailabh Nagar
2006-03-14 19:28 ` [Patch 0/9] Per-task delay accounting Greg KH
2006-03-14 20:49   ` Shailabh Nagar
2006-03-14 21:24     ` Greg KH
2006-03-14 21:59       ` Shailabh Nagar
2006-03-23 15:16   ` [Patch 0/9] Performance Shailabh Nagar
2006-03-25  2:38     ` Greg KH
2006-03-27 18:28       ` Shailabh Nagar

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=4416DF4A.7040908@watson.ibm.com \
    --to=nagar@watson.ibm.com \
    --cc=arjan@infradead.org \
    --cc=jes@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    /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.