Skip to contentSkip to conversation

about PENTIUM4 cache line

DISCUSSION michaelc 7 participants 9 messages Mar 9, 2001 – Aug 17, 2003 ACPI

lore
Share & tools
lore

michaelc

author
#0 lore raw

Hi,
I read the Intel IA-32 developer's manual recently, and I found
the cache lines for L1 and L2 caches in Pentium4 are 64 bytes wide, but the thing make me confused is that the default value CONFIG_X86_L1_CACHE_SHIFT option in 2.4.x kernel is 7, why it's
not 6? Any expanation about this would be appreciated!

Signature · 2 lines
Best regards,
Michael Chen                          mailto:[email protected]
#1 lore raw

shutdown on pressing the ATX power button

high!

is there any way to let the system execute something by pressing the ATX power button (preferrable executing 'shutdown -h now', but would be nice if it was configurable)

I looked into the (very large) list archive but didnt find any answer. if it is a kind of FAQ or off topic, please point me to the place I could find an answer.

PS.: Im not on the list, so please CC to my address if possible.
(but its not vital as I also could look into the archive)

Thanks in advance

Sergei

--------------------------------------------------------------------
eMail: [email protected]
--------------------------------------------------------------------
Be careful of reading health books, you might die of a misprint.
-- Mark Twain

#2 lore raw

Re: shutdown on pressing the ATX power button

In reply to michaelc

Hi!

Quoted 7 lines

is there any way to let the system execute something by pressing the ATX power button (preferrable executing 'shutdown -h now', but would be nice if it was configurable)

I looked into the (very large) list archive but didnt find any answer. if it is a kind of FAQ or off topic, please point me to the place I could find an answer.

Try this, and put this: into inittab

# Action on special keypress (ALT-UpArrow)
kb::kbrequest:/etc/rc/rc.reboot 2 0

drivers/acpi/events/evevent.c +2 -0
@@ -193,6 +168,8 @@
 
 	if ((status_register & ACPI_STATUS_POWER_BUTTON) &&
 		(enable_register & ACPI_ENABLE_POWER_BUTTON)) {
+                printk ("acpi: Power button pressed!\n");
+                kill_proc (1, SIGWINCH, 1);
 		int_status |= acpi_ev_fixed_event_dispatch (ACPI_EVENT_POWER_BUTTON);
 	}
 
Signature · 2 lines
I'm [email protected]. "In my country we have almost anarchy and I don't care."
Panos Katsaloulis describing me w.r.t. patents at [email protected]
#3 lore raw
In reply to michaelc
Quoted 5 lines · michaelc

I read the Intel IA-32 developer's manual recently, and I found
the cache lines for L1 and L2 caches in Pentium4 are 64 bytes wide, but the thing make me confused is that the default value CONFIG_X86_L1_CACHE_SHIFT option in 2.4.x kernel is 7, why it's
not 6? Any expanation about this would be appreciated!

I don't recall seeing an answer to this.
Was there one?

Cheers,
-- Jamie

#4 lore raw

What's even more interesting is the following:

tux:/usr/src/linux-2.6.0-test3 # grep -r "CONFIG_X86_L1_CACHE_SHIFT" * arch/i386/defconfig:CONFIG_X86_L1_CACHE_SHIFT=7 arch/x86_64/defconfig:CONFIG_X86_L1_CACHE_SHIFT=6 include/asm-x86_64/cache.h:#define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT) include/linux/autoconf.h:#define CONFIG_X86_L1_CACHE_SHIFT 5 include/asm-i386/cache.h:#define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT)
include/asm/cache.h:#define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT)
include/config/x86/l1/cache/shift.h:#define CONFIG_X86_L1_CACHE_SHIFT 5 tux:/usr/src/linux-2.6.0-test3 #

Life sure is interesting.

Cheers,
Dave

Quoted 20 lines · Jamie Lokier
Quoted 5 lines · michaelc

I read the Intel IA-32 developer's manual recently, and I found
the cache lines for L1 and L2 caches in Pentium4 are 64 bytes wide, but the thing make me confused is that the default value CONFIG_X86_L1_CACHE_SHIFT option in 2.4.x kernel is 7, why it's
not 6? Any expanation about this would be appreciated!

I don't recall seeing an answer to this.
Was there one?

Cheers,
-- Jamie
-
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/

#5 lore raw
Quoted 1 line · David B. Stevens

What's even more interesting is the following:

why ?

Quoted 3 lines

tux:/usr/src/linux-2.6.0-test3 # grep -r "CONFIG_X86_L1_CACHE_SHIFT" * arch/i386/defconfig:CONFIG_X86_L1_CACHE_SHIFT=7 arch/x86_64/defconfig:CONFIG_X86_L1_CACHE_SHIFT=6

correct default values for P4 and Hammer respectively.

Quoted 2 lines

include/asm-x86_64/cache.h:#define L1_CACHE_SHIFT
(CONFIG_X86_L1_CACHE_SHIFT)

Looks sane.

Quoted 1 line

include/linux/autoconf.h:#define CONFIG_X86_L1_CACHE_SHIFT 5

compile-time generated from .config

Quoted 2 lines

include/asm-i386/cache.h:#define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT)
include/asm/cache.h:#define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT)

looks sane

Quoted 1 line

include/config/x86/l1/cache/shift.h:#define CONFIG_X86_L1_CACHE_SHIFT 5

compile time generated from .config.

Dave

Signature · 1 line
 Dave Jones     http://www.codemonkey.org.uk
#6 lore raw

Dave,

Thanks that explains it.

The layout as well as the size needs to be taken into account.

Cheers,
Dave

Quoted 31 lines · Dave Jones
Quoted 1 line · David B. Stevens

What's even more interesting is the following:

why ?

Quoted 3 lines

tux:/usr/src/linux-2.6.0-test3 # grep -r "CONFIG_X86_L1_CACHE_SHIFT" * arch/i386/defconfig:CONFIG_X86_L1_CACHE_SHIFT=7 arch/x86_64/defconfig:CONFIG_X86_L1_CACHE_SHIFT=6

correct default values for P4 and Hammer respectively.

Quoted 2 lines

include/asm-x86_64/cache.h:#define L1_CACHE_SHIFT
(CONFIG_X86_L1_CACHE_SHIFT)

Looks sane.

Quoted 1 line

include/linux/autoconf.h:#define CONFIG_X86_L1_CACHE_SHIFT 5

compile-time generated from .config

Quoted 2 lines

include/asm-i386/cache.h:#define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT)
include/asm/cache.h:#define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT)

looks sane

Quoted 1 line

include/config/x86/l1/cache/shift.h:#define CONFIG_X86_L1_CACHE_SHIFT 5

compile time generated from .config.

Dave

#7 lore raw
In reply to Jamie Lokier
Quoted 9 lines · Jamie Lokier
Quoted 5 lines · michaelc

I read the Intel IA-32 developer's manual recently, and I found
the cache lines for L1 and L2 caches in Pentium4 are 64 bytes wide, but the thing make me confused is that the default value CONFIG_X86_L1_CACHE_SHIFT option in 2.4.x kernel is 7, why it's
not 6? Any expanation about this would be appreciated!

I don't recall seeing an answer to this.
Was there one?

ISTR it was something to do with how the P4 cachelines are laid out. Something like 2 sectors of 64 byte lines.

Dave

Signature · 1 line
 Dave Jones     http://www.codemonkey.org.uk
#8 lore raw
In reply to Jamie Lokier
Quoted 11 lines · Jamie Lokier
Quoted 5 lines · michaelc

I read the Intel IA-32 developer's manual recently, and I found
the cache lines for L1 and L2 caches in Pentium4 are 64 bytes wide, but the thing make me confused is that the default value CONFIG_X86_L1_CACHE_SHIFT option in 2.4.x kernel is 7, why it's
not 6? Any expanation about this would be appreciated!

I don't recall seeing an answer to this.
Was there one?

There is some confusion about P4 cache line size but

Intel Software Developer's Manual VOL 1

Page 2.12, Par 2.6:
"128-byte cache line size
- Two 64-byte sectors"

regards,
Philippe Elie