2006-03-09 23:11:13

by Roland Dreier

[permalink] [raw]
Subject: Re: [PATCH 7 of 20] ipath - misc driver support code

> +static unsigned handle_frequent_errors(struct ipath_devdata *dd,
> + ipath_err_t errs, char msg[512],
> + int *noprint)
> +{
> + cycles_t nc;
> + static cycles_t nextmsg_time;
> + static unsigned nmsgs, supp_msgs;
> +
> + /*
> + * throttle back "fast" messages to no more than 10 per 5 seconds
> + * (1.4-2GHz clock). This isn't perfect, but it's a reasonable
> + * heuristic. If we get more than 10, give a 5x longer delay
> + */

Could this be replaced by printk_ratelimit()?

- R.


2006-03-09 23:27:58

by Bryan O'Sullivan

[permalink] [raw]
Subject: Re: [PATCH 7 of 20] ipath - misc driver support code

On Thu, 2006-03-09 at 15:11 -0800, Roland Dreier wrote:
> > +static unsigned handle_frequent_errors(struct ipath_devdata *dd,
> > + ipath_err_t errs, char msg[512],
> > + int *noprint)

> Could this be replaced by printk_ratelimit()?

I looked into doing that a few weeks ago, and it really didn't look like
a good fit at all.

<b