lkml.org 
[lkml]   [2003]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.5.71-mm1
Neil Brown <neilb@cse.unsw.edu.au> wrote:
>
> On Sunday June 15, akpm@digeo.com wrote:
> >
> > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.5/2.5.71/2.5.71-mm1/
> >
> >
> > Mainly a resync.
> >
> > . Manfred sent me a revised unmap-page-debugging patch which promptly
> > broke. All slab changes have been dropped out so he can have a clear run
> > at that.
> >
> > . New toy. Called, for the lack of a better name, "sleepometer":
> >
>
> New toy seems to be lacking mainspring...
>
> In particular, sleepo.h cannot be found :-(
>

oops.


#ifndef SLEEPOMETER_H
#define SLEEPOMETER_H

#include <linux/spinlock.h>
#include <asm/linkage.h>

struct sleepo_data {
spinlock_t lock;
unsigned long nr_sleeps;
unsigned long long total_usecs;
unsigned long long max_usecs;
const char *file;
const char *sleep_type;
int line;
struct sleepo_data *next;
};

void sleepo_io_schedule(void);
long sleepo_io_schedule_timeout(long timeout);
asmlinkage void sleepo_schedule(void);
void sleepo_preempt_schedule(void);
signed long sleepo_schedule_timeout(signed long timeout);
void sleepo_begin(const char *file, int line,
const char *sleep_type, struct sleepo_data *sd);
void sleepo_end(struct sleepo_data *sd);
void sleepo_start(const char *file, int line,
const char *sleep_type, struct sleepo_data *sd);
void sleepo_stop(struct sleepo_data *sd);

#define schedule() \
do { \
static struct sleepo_data sd; \
\
sleepo_start(__FILE__, __LINE__, "schedule", &sd); \
sleepo_schedule(); \
sleepo_stop(&sd); \
} while (0)

#define preempt_schedule() \
do { \
static struct sleepo_data sd; \
\
sleepo_start(__FILE__, __LINE__, "preempt_schedule" &sd);\
sleepo_preempt_schedule(); \
sleepo_stop(&sd); \
} while (0)

#define io_schedule() \
do { \
static struct sleepo_data sd; \
\
sleepo_start(__FILE__, __LINE__, "io_schedule", &sd); \
sleepo_io_schedule(); \
sleepo_stop(&sd); \
} while (0)

#define schedule_timeout(t) \
({ \
static struct sleepo_data sd; \
long ret; \
\
sleepo_start(__FILE__, __LINE__, "schedule_timeout", &sd);\
ret = sleepo_schedule_timeout(t); \
sleepo_stop(&sd); \
ret; \
})

#define io_schedule_timeout(t) \
({ \
static struct sleepo_data sd; \
long ret; \
\
sleepo_start(__FILE__, __LINE__, "io_schedule_timeout", &sd);\
ret = sleepo_io_schedule_timeout(t); \
sleepo_stop(&sd); \
ret; \
})

#endif /* SLEEPOMETER_H */

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.024 / U:29.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site