Skip to contentSkip to conversation

+ clocksource-initialize-list-value.patch added to -mm tree

DISCUSSION Thomas Gleixner 3 participants 4 messages Oct 8, 2006 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 4 lines · On Fri, 2006-10-06 at 18:53 -0700, [email protected] wrote:

A change to clocksource initialization. It's optional for new clocksources, but prefered. If the list field is initialized it allows clocksource_register to complete faster since it doesn't have the scan the list of clocks doing strcmp on each.

Either make it required or not.

Quoted 8 lines

diff -puN arch/i386/kernel/hpet.c~clocksource-initialize-list-value arch/i386/kernel/hpet.c

arch/i386/kernel/hpet.c renamed from arch/i386/kernel/hpet.c~clocksource-initialize-list-value +1 -0
@@ -27,6 +27,7 @@ static struct clocksource clocksource_hp
 	.mult		= 0, /* set below */
 	.shift		= HPET_SHIFT,
 	.is_continuous	= 1,
+	.list		= CLOCKSOURCE_LIST_INIT(clocksource_hpet.list),

...

arch/i386/kernel/hpet.c

Quoted 3 lines
arch/i386/kernel/hpet.c renamed from arch/i386/kernel/hpet.c~clocksource-initialize-list-value +3 -0
+/* Abstracted list initialization */
+#define CLOCKSOURCE_LIST_INIT(x)	LIST_HEAD_INIT(x)
+

Please use LIST_HEAD_INIT(). This is not an abstraction, this is an obfuscation.

tglx

#2 lore raw
Quoted 7 lines · Thomas Gleixner
Quoted 4 lines · On Fri, 2006-10-06 at 18:53 -0700, [email protected] wrote:

A change to clocksource initialization. It's optional for new clocksources, but prefered. If the list field is initialized it allows clocksource_register to complete faster since it doesn't have the scan the list of clocks doing strcmp on each.

Either make it required or not.

This is for compatability with all those clocksources people are writing that just haven't been released (assuming they will be eventually released). I would love to make this required.

Quoted 9 lines
Quoted 8 lines

diff -puN arch/i386/kernel/hpet.c~clocksource-initialize-list-value arch/i386/kernel/hpet.c

arch/i386/kernel/hpet.c renamed from arch/i386/kernel/hpet.c~clocksource-initialize-list-value +1 -0
@@ -27,6 +27,7 @@ static struct clocksource clocksource_hp
 	.mult		= 0, /* set below */
 	.shift		= HPET_SHIFT,
 	.is_continuous	= 1,
+	.list		= CLOCKSOURCE_LIST_INIT(clocksource_hpet.list),

...

Quoted 6 lines

arch/i386/kernel/hpet.c

Quoted 3 lines
arch/i386/kernel/hpet.c renamed from arch/i386/kernel/hpet.c~clocksource-initialize-list-value +3 -0
+/* Abstracted list initialization */
+#define CLOCKSOURCE_LIST_INIT(x)	LIST_HEAD_INIT(x)
+

Please use LIST_HEAD_INIT(). This is not an abstraction, this is an obfuscation.

The reason it's there is to make the list->plist or plist->list transition easier. I'd be happy to remove when I feel that's settled, which may be right now.

Daniel

#3 lore raw
Quoted 7 lines · Daniel Walker
Quoted 6 lines · Thomas Gleixner
Quoted 4 lines · On Fri, 2006-10-06 at 18:53 -0700, [email protected] wrote:

A change to clocksource initialization. It's optional for new clocksources, but prefered. If the list field is initialized it allows clocksource_register to complete faster since it doesn't have the scan the list of clocks doing strcmp on each.

Quoted 5 lines
Quoted 1 line

Either make it required or not.

This is for compatability with all those clocksources people are writing that just haven't been released (assuming they will be eventually released). I would love to make this required.

so do it. The ones that are in development are easily fixed and consistency is worth a LOT in terms of API. Bonus points if the kernel printk's a helpful message on abuse.

#4 lore raw
Quoted 5 lines · Arjan van de Ven

so do it. The ones that are in development are easily fixed and consistency is worth a LOT in terms of API. Bonus points if the kernel printk's a helpful message on abuse.

I was kicking myself for the "clocksource" kernel parameter removal, but I guess that's more akin to being exposed to userspace.

The printks might just end up being an OOPS, but I can look into it.

Daniel