[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080923225452.e93186c0.akpm@linux-foundation.org>
Date: Tue, 23 Sep 2008 22:54:52 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Arjan van de Ven <arjan@...radead.org>
Cc: linux-kernel@...r.kernel.org, mingo@...e.hu,
Hugh Dickins <hugh@...itas.com>,
Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>,
"Randy.Dunlap" <rdunlap@...otime.net>
Subject: Re: [PATCH 2/3] corruption check: run the corruption checks from a
work queue
On Tue, 23 Sep 2008 21:54:13 -0700 Arjan van de Ven <arjan@...radead.org> wrote:
>
> From: Arjan van de Ven <arjan@...ux.intel.com>
> Date: Mon, 22 Sep 2008 13:42:15 -0700
> Subject: [PATCH] corruption check: run the corruption checks from a work queue
>
> the corruption checks are better off run from a work queue; there's nothing
> time critical about them and this way the amount of interrupt-context work
> is reduced.
>
> ...
>
> +int start_periodic_check_for_corruption(void)
> {
> if (!memory_corruption_check || corruption_check_period == 0)
> - return;
> + return 0;
>
> printk(KERN_INFO "Scanning for low memory corruption every %d seconds\n",
> corruption_check_period);
>
> init_timer(&periodic_check_timer);
> periodic_check_timer.function = &periodic_check_for_corruption;
> - periodic_check_for_corruption(0);
> + mod_timer(&periodic_check_timer,
> + round_jiffies(jiffies + corruption_check_period*HZ));
> + return 0;
> }
Could use schedule_delayed_work() and zap the timer altogether?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists