All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dipankar Sarma <dipankar@in.ibm.com>
To: Arjan van de Ven <arjan@infradead.org>
Cc: Shailabh Nagar <nagar@watson.ibm.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	lse-tech <lse-tech@lists.sourceforge.net>
Subject: Re: [Patch 4/7] Add sysctl for delay accounting
Date: Mon, 27 Feb 2006 14:34:14 +0530	[thread overview]
Message-ID: <20060227090414.GA18941@in.ibm.com> (raw)
In-Reply-To: <1141029743.2992.71.camel@laptopd505.fenrus.org>

On Mon, Feb 27, 2006 at 09:42:23AM +0100, Arjan van de Ven wrote:
> On Mon, 2006-02-27 at 03:38 -0500, Shailabh Nagar wrote:
> > Arjan van de Ven wrote:
> > 
> > The function needs to allocate task_delay_info structs for all tasks 
> > that might
> > have been forked since the last time delay accounting was turned off.
> > Either we have to count how many such tasks there are, or preallocate
> > nr_tasks (as an upper bound) and then use as many as needed.
> 
> it generally feels really fragile, especially with the task enumeration
> going to RCU soon. (eg you'd lose the ability to lock out new task
> creation)

I haven't yet seen any RCU-based code that does this. Can you point out
what patches you are talking about ? As of 2.6.16-rc4 and -rt15,
AFAICS, you can count tasks by holding the read side of tasklist_lock.
Granted it is a bit ugly to repeat this in order to overcome
the race on dropping tasklist_lock for allocation.

> On first sight it looks a lot better to allocate these things on demand,
> but I'm not sure how the sleeping-allocation would interact with the
> places it'd need to be called...

This could be a problem for contexts where sleeping cannot be permitted,
not to mention fast paths where blocking may introduce a skew. It seems
simpler to just let this happen during sysctl time.

Thanks
Dipankar

  parent reply	other threads:[~2006-02-27  9:05 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-27  7:56 [Patch 0/7] Per-task delay accounting Shailabh Nagar
2006-02-27  8:02 ` [Patch 1/7] timespec diff utility Shailabh Nagar
2006-02-27  8:12   ` [Patch 2/7] Add sysctl for schedstats Shailabh Nagar
2006-02-27  8:52     ` Ingo Molnar
2006-02-27 10:46       ` [Lse-tech] " Balbir Singh
2006-02-27 12:18         ` Arjan van de Ven
2006-02-27 12:29           ` Balbir Singh
2006-02-27 13:06             ` Arjan van de Ven
2006-02-27 16:16               ` Balbir Singh
2006-02-27  9:17     ` Nick Piggin
2006-02-27  9:41       ` Shailabh Nagar
2006-02-27 12:28         ` Nick Piggin
2006-02-27 19:09       ` [Lse-tech] " Chandra Seetharaman
2006-02-28  0:25         ` Nick Piggin
2006-02-28  1:42           ` chandra seetharaman
2006-03-07 17:26       ` schedstats refinement (was Re: [Lse-tech] Re: [Patch 2/7] Add sysctl for schedstats) Balbir Singh
2006-02-27 17:05     ` [Lse-tech] [Patch 2/7] Add sysctl for schedstats Bryan O'Sullivan
2006-02-27 20:55       ` Shailabh Nagar
2006-02-27 22:26         ` Bryan O'Sullivan
2006-02-27  8:22   ` [Patch 1/7] timespec diff utility Arjan van de Ven
2006-02-27  8:34     ` Shailabh Nagar
2006-02-27  8:37       ` Arjan van de Ven
2006-02-27  8:15 ` [Patch 3/7] delay accounting initial setup Shailabh Nagar
2006-02-27  8:18 ` [Patch 4/7] Add sysctl for delay accounting Shailabh Nagar
2006-02-27  8:26   ` Arjan van de Ven
2006-02-27  8:38     ` Shailabh Nagar
2006-02-27  8:42       ` Arjan van de Ven
2006-02-27  8:59         ` Shailabh Nagar
2006-02-27 11:18           ` [Lse-tech] " Balbir Singh
2006-02-27  9:04         ` Dipankar Sarma [this message]
2006-02-27  9:13           ` Arjan van de Ven
2006-02-27 10:11             ` [Lse-tech] " Balbir Singh
2006-02-27 11:24               ` Arjan van de Ven
2006-02-27 12:00                 ` Balbir Singh
2006-02-27 12:23                 ` Srivatsa Vaddagiri
2006-02-27  8:20 ` [Patch 5/7] synchronous block I/O delays Shailabh Nagar
2006-02-27  8:29   ` Arjan van de Ven
2006-02-27  9:13     ` Shailabh Nagar
2006-02-27  9:18       ` Arjan van de Ven
2006-02-27  9:24       ` Arjan van de Ven
2006-02-27 14:18   ` Andi Kleen
2006-02-27 21:31     ` Shailabh Nagar
2006-02-27 22:09     ` Shailabh Nagar
2006-02-27 22:20       ` Andi Kleen
2006-02-28  8:10       ` Arjan van de Ven
2006-02-27  8:22 ` [Patch 6/7] Swapin page fault delays Shailabh Nagar
2006-02-27  8:30   ` Arjan van de Ven
2006-02-27 22:16     ` Shailabh Nagar
2006-02-27  8:31 ` [Patch 7/7] Generic netlink interface (delay accounting) Shailabh Nagar
     [not found]   ` <1141045194.5363.12.camel@localhost.localdomain>
     [not found]     ` <4403608E.1050304@watson.ibm.com>
     [not found]       ` <1141652556.5185.64.camel@localhost.localdomain>
2006-03-06 17:00         ` Shailabh Nagar
2006-03-07 14:38           ` [Lse-tech] " jamal
2006-03-08 21:56             ` Shailabh Nagar
2006-03-08 21:56               ` Shailabh Nagar
2006-03-09 14:37               ` [UPDATED PATCH] Re: [Lse-tech] " Balbir Singh
2006-03-09 14:37                 ` [UPDATED PATCH] " Balbir Singh
2006-03-09 16:06                 ` [UPDATED PATCH] Re: [Lse-tech] " Shailabh Nagar
2006-03-09 16:06                   ` [UPDATED PATCH] " Shailabh Nagar
2006-03-10 14:53                 ` [UPDATED PATCH] Re: [Lse-tech] " jamal
2006-03-10 14:53                   ` [UPDATED PATCH] " jamal
2006-03-10 15:35                   ` [UPDATED PATCH] Re: [Lse-tech] " jamal
2006-03-10 16:39                   ` Balbir Singh
2006-03-10 16:39                     ` [UPDATED PATCH] " Balbir Singh
2006-03-11 13:30                     ` [UPDATED PATCH] Re: [Lse-tech] " jamal
2006-03-11 13:30                       ` [UPDATED PATCH] " jamal
2006-03-13 16:21                       ` [UPDATED PATCH] Re: [Lse-tech] " Balbir Singh
2006-02-27  9:10 ` [Patch 0/7] Per-task delay accounting Nick Piggin

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=20060227090414.GA18941@in.ibm.com \
    --to=dipankar@in.ibm.com \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lse-tech@lists.sourceforge.net \
    --cc=nagar@watson.ibm.com \
    /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.