Re: [RFC][PATCH] Add do_not_call_when_idle option to timer and workqueue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andrew Morton wrote:
Index: linux-2.6.19-rc-mm/include/linux/timer.h
===================================================================
--- linux-2.6.19-rc-mm.orig/include/linux/timer.h	2006-11-13 15:06:26.000000000 -0800
+++ linux-2.6.19-rc-mm/include/linux/timer.h	2006-11-13 16:01:03.000000000 -0800
@@ -8,6 +8,8 @@
struct tvec_t_base_s; +#define TIMER_FLAG_NOT_IN_IDLE (0x1)
+
 struct timer_list {
 	struct list_head entry;
 	unsigned long expires;
@@ -16,6 +18,7 @@
 	unsigned long data;
struct tvec_t_base_s *base;
+	int	flags;
 #ifdef CONFIG_TIMER_STATS

Adding a new field to the timer_list is somewhat of a hit - this is going
to make an awful lot of data structures a bit larger.  Some of which we
allocate a large number of.

I think we could justfy getting nasty and using the LSB of
timer_list.function for this..


The lsb of a function pointer is used in variable length instruction processors (such as x86 when optimizing for size). The msb is constant though.

--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux