mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gerrit Huizenga <gh@us.ibm.com>
To: Greg KH <greg@kroah.com>
Cc: linux-kernel@vger.kernel.org, akpm@osdl.org,
	Rik van Riel <riel@redhat.com>, Chris Mason <mason@suse.com>,
	ckrm-tech <ckrm-tech@lists.sourceforge.net>
Subject: Re: [PATCH] CKRM: 2/10 CKRM: Accurate delay accounting
Date: Thu, 24 Feb 2005 01:33:05 -0800	[thread overview]
Message-ID: <E1D4FMo-0006uj-00@w-gerrit.beaverton.ibm.com> (raw)
In-Reply-To: Your message of Mon, 29 Nov 2004 13:38:25 PST. <20041129213825.GB19892@kroah.com>


On Mon, 29 Nov 2004 13:38:25 PST, Greg KH wrote:
> On Mon, Nov 29, 2004 at 10:46:53AM -0800, Gerrit Huizenga wrote:
> > @@ -912,6 +915,9 @@
> >  extern void set_task_comm(struct task_struct *tsk, char *from);
> >  extern void get_task_comm(char *to, struct task_struct *tsk);
> >  
> > +#define PF_MEMIO   	0x00400000      /* I am  potentially doing I/O for mem */
> > +#define PF_IOWAIT       0x00800000      /* I am waiting on disk I/O */
> > +
> 
> Mix of tabs and spaces :(
 
Fixed.

> >  #ifdef CONFIG_SMP
> >  extern void wait_task_inactive(task_t * p);
> >  #else
> > @@ -1111,6 +1117,86 @@
> >  
> >  #endif
> >  
> > +/* API for registering delay info */
> > +#ifdef CONFIG_DELAY_ACCT
> > +
> > +#define test_delay_flag(tsk,flg)                ((tsk)->flags & (flg))
> > +#define set_delay_flag(tsk,flg)                 ((tsk)->flags |= (flg))
> > +#define clear_delay_flag(tsk,flg)               ((tsk)->flags &= ~(flg))
> > +
> > +#define def_delay_var(var)		        unsigned long long var
> > +#define get_delay(tsk,field)                    ((tsk)->delays.field)
> > +
> > +#define start_delay(var)                        ((var) = sched_clock())
> > +#define start_delay_set(var,flg)                (set_delay_flag(current,flg),(var) = sched_clock())
> 
> You mixed tabs and spaces here.  Just use tabs please.
 
Fixed.

> > +#define add_delay_clear(tsk,field,start_ts,flg)        \
> > +	do {                                           \
> > +		unsigned long long now = sched_clock();\
> > +           	add_delay_ts(tsk,field,start_ts,now);  \
> > +           	clear_delay_flag(tsk,flg);             \
> > +        } while (0)
> 
> -ENOTABS
 
Fixed.

> > +#else
> > +
> > +#define test_delay_flag(tsk,flg)                (0)
> > +#define set_delay_flag(tsk,flg)                 do { } while (0)
> > +#define clear_delay_flag(tsk,flg)               do { } while (0)
> > +
> > +#define def_delay_var(var)			      
> > +#define get_delay(tsk,field)                    (0)
> > +
> > +#define start_delay(var)                        do { } while (0)
> > +#define start_delay_set(var,flg)                do { } while (0)
> > +
> > +#define inc_delay(tsk,field)                    do { } while (0)
> > +#define add_delay_ts(tsk,field,start_ts,now)    do { } while (0)
> > +#define add_delay_clear(tsk,field,start_ts,flg) do { } while (0)
> > +#define add_io_delay(dstart)			do { } while (0) 
> > +#define init_delays(tsk)                        do { } while (0)
> > +#endif
> > +
> 
> It's that key over there on the left hand side of the keyboard...
 
Found it.  Thanks!

> > +/* Changes
> > + *
> > + * 24 Aug 2003
> > + *    Created.
> > + */
> 
> No changelogs in files again please.
 
Globally gone.

> > +
> > +#ifndef _LINUX_TASKDELAYS_H
> > +#define _LINUX_TASKDELAYS_H
> > +
> > +#include <linux/config.h>
> > +#include <linux/types.h>
> > +
> > +struct task_delay_info {
> > +#if defined CONFIG_DELAY_ACCT 
> > +	/* delay statistics in usecs */
> > +	uint64_t waitcpu_total;
> > +	uint64_t runcpu_total;
> > +	uint64_t iowait_total;
> > +	uint64_t mem_iowait_total;
> > +	uint32_t runs;
> > +	uint32_t num_iowaits;
> > +	uint32_t num_memwaits;
> > +#endif				
> > +};
> 
> A null structure otherwise?  Why?
 
Bizarro world.  Fixed.

> > +#ifdef CONFIG_DELAY_ACCT
> > +int task_running_sys(struct task_struct *p)
> > +{
> > +	return task_is_running(p);
> > +}
> > +EXPORT_SYMBOL_GPL(task_running_sys);
> > +#endif
> 
> So LGPL code can use EXPORT_SYMBOL_GPL?

You lost me on this one - what LGPL code is using task_running_sys?
(and actually, I've held off on resubmitting the RBCE code for a few
days which is the code that uses this while we get some air time on
the broken up patch).

gerrit

      parent reply	other threads:[~2005-02-24  9:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-29 18:46 Gerrit Huizenga
2004-11-29 21:38 ` Greg KH
2004-11-30  7:44   ` Arjan van de Ven
2005-02-24  9:33   ` Gerrit Huizenga [this message]

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=E1D4FMo-0006uj-00@w-gerrit.beaverton.ibm.com \
    --to=gh@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=ckrm-tech@lists.sourceforge.net \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mason@suse.com \
    --cc=riel@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®