Skip to contentSkip to conversation

mmotm 2009-09-09-22-56 uploaded

DISCUSSION Suresh Jayaraman 3 participants 5 messages Sep 29, 2009 x86

lore
Share & tools
lore
#0 lore raw

Hi all,

Quoted 8 lines · On Thu, Sep 10, 2009 at 11:31 AM, <[email protected]> wrote:

The mm-of-the-moment snapshot 2009-09-09-22-56 has been uploaded to

http://userweb.kernel.org/~akpm/mmotm/

and will soon be available at

git://git.zen-sources.org/zen/mmotm.git

With this snapshot plus fixes, I'm unable to limit the memory using the kernel command line switch "mem=nn" on a x86_64 box. Is this the expected behavior?

Using "cgroup_disable=memory" together with "mem=nn" switch didn't help. Am I supposed to use some other switch along with this?

Thanks,

Signature · 1 line
Suresh Jayaraman
#1 lore raw
Quoted 12 lines · On Tue, 29 Sep 2009 11:49:39 +0530 Suresh Jayaraman <[email protected]> wrote:

Hi all,

Quoted 8 lines · On Thu, Sep 10, 2009 at 11:31 AM, <[email protected]> wrote:

The mm-of-the-moment snapshot 2009-09-09-22-56 has been uploaded to

http://userweb.kernel.org/~akpm/mmotm/

and will soon be available at

git://git.zen-sources.org/zen/mmotm.git

Quoted 7 lines

With this snapshot plus fixes, I'm unable to limit the memory using the kernel command line switch "mem=nn" on a x86_64 box. Is this the expected behavior?

Using "cgroup_disable=memory" together with "mem=nn" switch didn't help. Am I supposed to use some other switch along with this?

hm, perhaps that -mm was needing this?

commit eda6da9286ad5b35b1eb70f6368958a8ee41a9dd

Author:     Yinghai Lu <[email protected]>
AuthorDate: Sat Sep 19 11:07:57 2009 -0700
Commit:     Ingo Molnar <[email protected]>
CommitDate: Sat Sep 19 20:31:33 2009 +0200

Revert 'x86: Fix system crash when loading with "reservetop" parameter'

After close looking, commit 8126dec3 will break:

1. some cpu feature in early stage too, like cpu_has_x2apic
2. will break built-in-command line
3. will break other memmap= and mem=
4. early_dbgp and early_console that will use early_ioremap to access mmio (?)

So revert it.

Cc Linus Torvalds <[email protected]>,
Cc Andrew Morton <[email protected]>,

LKML-Reference: <[email protected]>

arch/x86/kernel/setup.c +15 -15
index 19f15c4..f5baa2a 100644
@@ -712,21 +712,6 @@ void __init setup_arch(char **cmdline_p)
 	printk(KERN_INFO "Command line: %s\n", boot_command_line);
 #endif
 
-	strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE);
-	*cmdline_p = command_line;
-
-#ifdef CONFIG_X86_64
-	/*
-	 * Must call this twice: Once just to detect whether hardware doesn't
-	 * support NX (so that the early EHCI debug console setup can safely
-	 * call set_fixmap(), and then again after parsing early parameters to
-	 * honor the respective command line option.
-	 */
-	check_efer();
-#endif
-
-	parse_early_param();
-
 	/* VMI may relocate the fixmap; do this before touching ioremap area */
 	vmi_init();
 
@@ -809,6 +794,21 @@ void __init setup_arch(char **cmdline_p)
 #endif
 #endif
 
+	strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE);
+	*cmdline_p = command_line;
+
+#ifdef CONFIG_X86_64
+	/*
+	 * Must call this twice: Once just to detect whether hardware doesn't
+	 * support NX (so that the early EHCI debug console setup can safely
+	 * call set_fixmap(), and then again after parsing early parameters to
+	 * honor the respective command line option.
+	 */
+	check_efer();
+#endif
+
+	parse_early_param();
+
 #ifdef CONFIG_X86_64
 	check_efer();
 #endif
#4 lore raw
In reply to Suresh Jayaraman
Quoted 9 lines · On Tue, 29 Sep 2009 11:49:39 +0530 Suresh Jayaraman <[email protected]> wrote:

Hi all,

Quoted 6 lines · On Thu, Sep 10, 2009 at 11:31 AM, <[email protected]> wrote:

The mm-of-the-moment snapshot 2009-09-09-22-56 has been uploaded to

http://userweb.kernel.org/~akpm/mmotm/

and will soon be available at

Quoted 8 lines
Quoted 2 lines

git://git.zen-sources.org/zen/mmotm.git

With this snapshot plus fixes, I'm unable to limit the memory using the kernel command line switch "mem=nn" on a x86_64 box. Is this the expected behavior?

Using "cgroup_disable=memory" together with "mem=nn" switch didn't help.

memory cgroup is independent from mem=nn switch.
(But yes, size of page_cgroup array is affected by size of memory.)

Quoted 2 lines

Am I supposed to use some other switch along with this?

Hmm, Isn't it related to this ?

http://patchwork.kernel.org/patch/48787/

Added Ingo, Thomas to CC. I'm sorry if above one is fixed and mem= should work.

Regards,
-Kame

#2 lore raw
In reply to Andrew Morton
Quoted 18 lines · On Mon, 28 Sep 2009 23:27:48 -0700 Andrew Morton <[email protected]>…
Quoted 16 lines · On Tue, 29 Sep 2009 11:49:39 +0530 Suresh Jayaraman <[email protected]> wrote:

Hi all,

Quoted 8 lines · On Thu, Sep 10, 2009 at 11:31 AM, <[email protected]> wrote:

The mm-of-the-moment snapshot 2009-09-09-22-56 has been uploaded to

http://userweb.kernel.org/~akpm/mmotm/

and will soon be available at

git://git.zen-sources.org/zen/mmotm.git

With this snapshot plus fixes, I'm unable to limit the memory using the kernel command line switch "mem=nn" on a x86_64 box. Is this the expected behavior?

Quoted 6 lines
Quoted 3 lines

Using "cgroup_disable=memory" together with "mem=nn" switch didn't help. Am I supposed to use some other switch along with this?

hm, perhaps that -mm was needing this?

It seems this revert has been in -mm already.

Regards,
-Kame

Quoted 80 lines

commit eda6da9286ad5b35b1eb70f6368958a8ee41a9dd

Author:     Yinghai Lu <[email protected]>
AuthorDate: Sat Sep 19 11:07:57 2009 -0700
Commit:     Ingo Molnar <[email protected]>
CommitDate: Sat Sep 19 20:31:33 2009 +0200

Revert 'x86: Fix system crash when loading with "reservetop" parameter'

After close looking, commit 8126dec3 will break:

1. some cpu feature in early stage too, like cpu_has_x2apic
2. will break built-in-command line
3. will break other memmap= and mem=
4. early_dbgp and early_console that will use early_ioremap to access mmio (?)

So revert it.

Cc Linus Torvalds <[email protected]>,
Cc Andrew Morton <[email protected]>,

LKML-Reference: <[email protected]>

arch/x86/kernel/setup.c +15 -16
index 19f15c4..f5baa2a 100644
@@ -712,21 +712,6 @@ void __init setup_arch(char **cmdline_p)
 	printk(KERN_INFO "Command line: %s\n", boot_command_line);
 #endif
 
-	strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE);
-	*cmdline_p = command_line;
-
-#ifdef CONFIG_X86_64
-	/*
-	 * Must call this twice: Once just to detect whether hardware doesn't
-	 * support NX (so that the early EHCI debug console setup can safely
-	 * call set_fixmap(), and then again after parsing early parameters to
-	 * honor the respective command line option.
-	 */
-	check_efer();
-#endif
-
-	parse_early_param();
-
 	/* VMI may relocate the fixmap; do this before touching ioremap area */
 	vmi_init();
 
@@ -809,6 +794,21 @@ void __init setup_arch(char **cmdline_p)
 #endif
 #endif
 
+	strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE);
+	*cmdline_p = command_line;
+
+#ifdef CONFIG_X86_64
+	/*
+	 * Must call this twice: Once just to detect whether hardware doesn't
+	 * support NX (so that the early EHCI debug console setup can safely
+	 * call set_fixmap(), and then again after parsing early parameters to
+	 * honor the respective command line option.
+	 */
+	check_efer();
+#endif
+
+	parse_early_param();
+
 #ifdef CONFIG_X86_64
 	check_efer();
 #endif
 
 
--

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/

#3 lore raw
In reply to Andrew Morton
Quoted 17 lines · Andrew Morton
Quoted 15 lines · On Tue, 29 Sep 2009 11:49:39 +0530 Suresh Jayaraman <[email protected]> wrote:

Hi all,

Quoted 8 lines · On Thu, Sep 10, 2009 at 11:31 AM, <[email protected]> wrote:

The mm-of-the-moment snapshot 2009-09-09-22-56 has been uploaded to

http://userweb.kernel.org/~akpm/mmotm/

and will soon be available at

git://git.zen-sources.org/zen/mmotm.git

With this snapshot plus fixes, I'm unable to limit the memory using the kernel command line switch "mem=nn" on a x86_64 box. Is this the expected behavior?

Quoted 6 lines
Quoted 3 lines

Using "cgroup_disable=memory" together with "mem=nn" switch didn't help. Am I supposed to use some other switch along with this?

hm, perhaps that -mm was needing this?

Yes, it does. /me yet to catch up with the latest -mm.

Quoted 6 lines

commit eda6da9286ad5b35b1eb70f6368958a8ee41a9dd

Author:     Yinghai Lu <[email protected]>
AuthorDate: Sat Sep 19 11:07:57 2009 -0700
Commit:     Ingo Molnar <[email protected]>
CommitDate: Sat Sep 19 20:31:33 2009 +0200

After applying this patch "mem=nn" works.

Thanks,

Signature · 1 line
Suresh Jayaraman