* Re: [PATCH 19/26] Dynamic kernel command-line - sh
[not found] ` <200610112116.56120.alon.barlev@gmail.com>
@ 2006-10-12 8:16 ` Paul Mundt
2006-10-12 8:30 ` Alon Bar-Lev
0 siblings, 1 reply; 6+ messages in thread
From: Paul Mundt @ 2006-10-12 8:16 UTC (permalink / raw)
To: Alon Bar-Lev
Cc: H. Peter Anvin, Andi Kleen, Matt Domsch, Andrew Morton,
linux-kernel, johninsd, davej, trini, davem, ecd, wli, rc, spyro,
rth, ralf, matthew, grundler, geert, zippel, heiko.carstens,
uclinux-v850, chris
On Wed, Oct 11, 2006 at 09:16:55PM +0200, Alon Bar-Lev wrote:
>
> 1. Rename saved_command_line into boot_command_line.
> 2. Set command_line as __initdata.
>
> Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
>
The sh bits look fine, though I'm fairly impartial to this change. It
doesn't seem like this is going to be needed in very many places..
In the future, you may also wish to CC linux-arch if you want the
attention of architecture maintainers.
Acked-by: Paul Mundt <lethal@linux-sh.org>
On Wed, Oct 11, 2006 at 09:17:10PM +0200, Alon Bar-Lev wrote:
>
> 1. Rename saved_command_line into boot_command_line.
> 2. Set command_line as __initdata.
>
> Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
>
Likewise for sh64.
Acked-by: Paul Mundt <lethal@linux-sh.org>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH 19/26] Dynamic kernel command-line - sh
2006-10-12 8:16 ` [PATCH 19/26] Dynamic kernel command-line - sh Paul Mundt
@ 2006-10-12 8:30 ` Alon Bar-Lev
0 siblings, 0 replies; 6+ messages in thread
From: Alon Bar-Lev @ 2006-10-12 8:30 UTC (permalink / raw)
To: Paul Mundt
Cc: H. Peter Anvin, Andi Kleen, Matt Domsch, Andrew Morton,
linux-kernel, johninsd, davej, trini, davem, ecd, wli, rc, spyro,
rth, ralf, matthew, grundler, geert, zippel, heiko.carstens,
uclinux-v850, chris
On 10/12/06, Paul Mundt <lethal@linux-sh.org> wrote:
> The sh bits look fine, though I'm fairly impartial to this change. It
> doesn't seem like this is going to be needed in very many places..
Thank you for your quick response!
But I failed to push i386 command-line size to more than 256 bytes...
You are right, it is required only for memory extreme devices...
Options:
1. Add COMMAND_LINE_SIZE to kernel config - was rejected because
kernel has already too much parameters, this was the initial patch
more than a year ago.
2. Just increase COMMAND_LINE_SIZE of i386, x86_64 - was rejected
because of it affecting low memory devices.
3. Convert the command-line into dynamically allocated buffers - this try.
> In the future, you may also wish to CC linux-arch if you want the
> attention of architecture maintainers.
Thank you, I was not aware of this.
I hope there will be no take 3 :)
Best Regards,
Alon Bar-Lev.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [patch 00/26] Dynamic kernel command-line
@ 2007-01-18 12:58 Bernhard Walle
2007-01-18 12:59 ` [patch 19/26] Dynamic kernel command-line - sh Bernhard Walle
0 siblings, 1 reply; 6+ messages in thread
From: Bernhard Walle @ 2007-01-18 12:58 UTC (permalink / raw)
To: linux-kernel
This patch has already been posted by Alon Bar-Lev <alon.barlev@gmail.com>
in 2nd Dec 2006. He didn't get any response. Because I think that this
patch would be really useful being able to increase the command line, I
post this patch again to get some response.
This patches are against 2.6.20-rc4-mm1.
Current implementation stores a static command-line buffer allocated to
COMMAND_LINE_SIZE size. Most architectures stores two copies of this
buffer, one for future reference and one for parameter parsing.
Current kernel command-line size for most architecture is much too small
for module parameters, video settings, initramfs parameters and much
more. The problem is that setting COMMAND_LINE_SIZE to a grater value,
allocates static buffers.
In order to allow a greater command-line size, these buffers should be
dynamically allocated or marked as init disposable buffers, so unused
memory can be released.
This patch renames the static saved_command_line variable into
boot_command_line adding __initdata attribute, so that it can be
disposed after initialization. This rename is required so applications
that use saved_command_line will not be affected by this change.
It reintroduces saved_command_line as dynamically allocated buffer to
match the data in boot_command_line.
It also mark secondary command-line buffer as __initdata, and copies it
to dynamically allocated static_command_line buffer components may hold
reference to it after initialization.
This patch is for linux-2.6.19 and is divided to target each
architecture. I could not check this in any architecture so please
forgive me if I got it wrong.
The per-architecture modification is very simple, use boot_command_line
in place of saved_command_line. The common code is the change into
dynamic command-line.
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [patch 19/26] Dynamic kernel command-line - sh
2007-01-18 12:58 [patch 00/26] Dynamic kernel command-line Bernhard Walle
@ 2007-01-18 12:59 ` Bernhard Walle
0 siblings, 0 replies; 6+ messages in thread
From: Bernhard Walle @ 2007-01-18 12:59 UTC (permalink / raw)
To: linux-kernel; +Cc: Alon Bar-Lev, Paul Mundt
[-- Attachment #1: dynamic-kernel-command-line-sh.diff --]
[-- Type: text/plain, Size: 1360 bytes --]
1. Rename saved_command_line into boot_command_line.
2. Set command_line as __initdata.
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
---
arch/sh/kernel/setup.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: linux-2.6.20-rc4-mm1/arch/sh/kernel/setup.c
===================================================================
--- linux-2.6.20-rc4-mm1.orig/arch/sh/kernel/setup.c
+++ linux-2.6.20-rc4-mm1/arch/sh/kernel/setup.c
@@ -75,7 +75,7 @@ static struct sh_machine_vector* __init
#define RAMDISK_PROMPT_FLAG 0x8000
#define RAMDISK_LOAD_FLAG 0x4000
-static char command_line[COMMAND_LINE_SIZE] = { 0, };
+static char __initdata command_line[COMMAND_LINE_SIZE] = { 0, };
static struct resource code_resource = { .name = "Kernel code", };
static struct resource data_resource = { .name = "Kernel data", };
@@ -90,8 +90,8 @@ static inline void parse_cmdline (char *
int len = 0;
/* Save unparsed command line copy for /proc/cmdline */
- memcpy(saved_command_line, COMMAND_LINE, COMMAND_LINE_SIZE);
- saved_command_line[COMMAND_LINE_SIZE-1] = '\0';
+ memcpy(boot_command_line, COMMAND_LINE, COMMAND_LINE_SIZE);
+ boot_command_line[COMMAND_LINE_SIZE-1] = '\0';
memory_start = (unsigned long)PAGE_OFFSET+__MEMORY_START;
memory_end = memory_start + __MEMORY_SIZE;
--
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 00/26] Dynamic kernel command-line
@ 2006-12-02 10:47 Alon Bar-Lev
2006-12-02 10:55 ` [PATCH 19/26] Dynamic kernel command-line - sh Alon Bar-Lev
0 siblings, 1 reply; 6+ messages in thread
From: Alon Bar-Lev @ 2006-12-02 10:47 UTC (permalink / raw)
To: linux-arch, linux-kernel
Hello,
This is take 3 of submission, I submit this patch
once in a few monthes to collect some more signatures :)
Until now, I got three:
- avr32
- sh
- sh64
I know this is not one of major priorities, but it
should be simple enough to be reviewed and included.
I will also be happy to get a REJECT response, so I
stop trying to get it included. Any suggestions of
how to push this farward will also be appreciated.
Current implementation stores a static command-line
buffer allocated to COMMAND_LINE_SIZE size. Most
architectures stores two copies of this buffer, one
for future reference and one for parameter parsing.
Current kernel command-line size for most architecture
is much too small for module parameters, video settings,
initramfs paramters and much more. The problem is that
setting COMMAND_LINE_SIZE to a grater value, allocates
static buffers.
In order to allow a greater command-line size, these
buffers should be dynamically allocated or marked
as init disposable buffers, so unused memory can be
released.
This patch renames the static saved_command_line
variable into boot_command_line adding __initdata
attribute, so that it can be disposed after
initialization. This rename is required so applications
that use saved_command_line will not be affected
by this change.
It reintroduces saved_command_line as dynamically
allocated buffer to match the data in boot_command_line.
It also mark secondary command-line buffer as __initdata,
and copies it to dynamically allocated static_command_line
buffer components may hold reference to it after
initialization.
This patch is for linux-2.6.19 and is divided to
target each architecture. I could not check this in any
architecture so please forgive me if I got it wrong.
The per-architecture modification is very simple, use
boot_command_line in place of saved_command_line. The
common code is the change into dynamic command-line.
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
---
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 19/26] Dynamic kernel command-line - sh
2006-12-02 10:47 [PATCH 00/26] Dynamic kernel command-line Alon Bar-Lev
@ 2006-12-02 10:55 ` Alon Bar-Lev
0 siblings, 0 replies; 6+ messages in thread
From: Alon Bar-Lev @ 2006-12-02 10:55 UTC (permalink / raw)
To: linux-arch, linux-kernel
1. Rename saved_command_line into boot_command_line.
2. Set command_line as __initdata.
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
---
diff -urNp linux-2.6.19.org/arch/sh/kernel/setup.c linux-2.6.19/arch/sh/kernel/setup.c
--- linux-2.6.19.org/arch/sh/kernel/setup.c 2006-11-29 23:57:37.000000000 +0200
+++ linux-2.6.19/arch/sh/kernel/setup.c 2006-12-02 11:31:33.000000000 +0200
@@ -75,7 +75,7 @@ static struct sh_machine_vector* __init
#define RAMDISK_PROMPT_FLAG 0x8000
#define RAMDISK_LOAD_FLAG 0x4000
-static char command_line[COMMAND_LINE_SIZE] = { 0, };
+static char __initdata command_line[COMMAND_LINE_SIZE] = { 0, };
static struct resource code_resource = { .name = "Kernel code", };
static struct resource data_resource = { .name = "Kernel data", };
@@ -91,8 +91,8 @@ static inline void parse_cmdline (char *
int len = 0;
/* Save unparsed command line copy for /proc/cmdline */
- memcpy(saved_command_line, COMMAND_LINE, COMMAND_LINE_SIZE);
- saved_command_line[COMMAND_LINE_SIZE-1] = '\0';
+ memcpy(boot_command_line, COMMAND_LINE, COMMAND_LINE_SIZE);
+ boot_command_line[COMMAND_LINE_SIZE-1] = '\0';
memory_start = (unsigned long)PAGE_OFFSET+__MEMORY_START;
memory_end = memory_start + __MEMORY_SIZE;
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 00/26] Dynamic kernel command-line - Resend please ignore last
@ 2006-09-03 22:15 Alon Bar-Lev
2006-09-03 22:22 ` [PATCH 19/26] Dynamic kernel command-line - sh Alon Bar-Lev
0 siblings, 1 reply; 6+ messages in thread
From: Alon Bar-Lev @ 2006-09-03 22:15 UTC (permalink / raw)
To: Alon Bar-Lev, Andi Kleen, Matt Domsch, Andrew Morton,
linux-kernel, johninsd, davej, Riley, trini, davem, ecd, jj,
anton, wli, lethal, lethal, rc, spyro, spyro, rth, avr32,
hskinnemoen, starvik, ralf, matthew, grundler, geert, zippel,
paulus, schwidefsky, heiko.carstens, uclinux-v850, chris
Current implementation stores a static command-line
buffer allocated to COMMAND_LINE_SIZE size. Most
architectures stores two copies of this buffer, one
for future reference and one for parameter parsing.
In order to allow a greater command-line size, these
buffers should be dynamically allocated or marked
as init disposable buffers, so unused memory can be
released.
This patch renames the static saved_command_line
variable into boot_command_line adding __initdata
attribute, so that it can be disposed after
initialization. This rename is required so applications
that use saved_command_line will not be affected
by this change.
It reintroduces saved_command_line as dynamically
allocated buffer to match the data in boot_command_line.
It also mark secondary command-line buffer as __initdata,
and copies it to dynamically allocated static_command_line
buffer components may hold reference to it after
initialization.
This patch is for linux-2.6.18-rc5-mm1 and is divided to
target each architecture. I could not check this in any
architecture so please forgive me if I got it wrong.
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
---
--
VGER BF report: H 0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 19/26] Dynamic kernel command-line - sh
2006-09-03 22:15 [PATCH 00/26] Dynamic kernel command-line - Resend please ignore last Alon Bar-Lev
@ 2006-09-03 22:22 ` Alon Bar-Lev
0 siblings, 0 replies; 6+ messages in thread
From: Alon Bar-Lev @ 2006-09-03 22:22 UTC (permalink / raw)
To: Andi Kleen
Cc: Matt Domsch, Andrew Morton, linux-kernel, johninsd, davej, Riley,
trini, davem, ecd, jj, anton, wli, lethal, rc, spyro, rth, avr32,
hskinnemoen, starvik, ralf, matthew, grundler, geert, zippel,
paulus, schwidefsky, heiko.carstens, uclinux-v850, chris
1. Rename saved_command_line into boot_command_line.
2. Set command_line as __initdata.
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
---
diff -urNp linux-2.6.18-rc5-mm1.org/arch/sh/kernel/setup.c linux-2.6.18-rc5-mm1/arch/sh/kernel/setup.c
--- linux-2.6.18-rc5-mm1.org/arch/sh/kernel/setup.c 2006-09-03 18:56:51.000000000 +0300
+++ linux-2.6.18-rc5-mm1/arch/sh/kernel/setup.c 2006-09-03 21:02:18.000000000 +0300
@@ -88,7 +88,7 @@ static struct sh_machine_vector* __init
#define RAMDISK_PROMPT_FLAG 0x8000
#define RAMDISK_LOAD_FLAG 0x4000
-static char command_line[COMMAND_LINE_SIZE] = { 0, };
+static char __initdata command_line[COMMAND_LINE_SIZE] = { 0, };
struct resource standard_io_resources[] = {
{ "dma1", 0x00, 0x1f },
@@ -125,8 +125,8 @@ static inline void parse_cmdline (char *
int len = 0;
/* Save unparsed command line copy for /proc/cmdline */
- memcpy(saved_command_line, COMMAND_LINE, COMMAND_LINE_SIZE);
- saved_command_line[COMMAND_LINE_SIZE-1] = '\0';
+ memcpy(boot_command_line, COMMAND_LINE, COMMAND_LINE_SIZE);
+ boot_command_line[COMMAND_LINE_SIZE-1] = '\0';
memory_start = (unsigned long)PAGE_OFFSET+__MEMORY_START;
memory_end = memory_start + __MEMORY_SIZE;
--
VGER BF report: H 0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 00/26] Dynamic kernel command-line
@ 2006-09-03 21:50 Alon Bar-Lev
2006-09-03 22:01 ` [PATCH 19/26] Dynamic kernel command-line - sh Alon Bar-Lev
0 siblings, 1 reply; 6+ messages in thread
From: Alon Bar-Lev @ 2006-09-03 21:50 UTC (permalink / raw)
To: Alon Bar-Lev, Andi Kleen, Matt Domsch, Andrew Morton,
linux-kernel, johninsd, davej, Riley, trini, davem, ecd, jj,
anton, wli, lethal, lethal, rc, spyro, spyro, rth, avr32,
hskinnemoen, starvik, ralf, matthew, grundler, geert, zippel,
paulus, schwidefsky, heiko.carstens, uclinux-v850, chris
Current implementation stores a static command-line
buffer allocated to COMMAND_LINE_SIZE size. Most
architectures stores two copies of this buffer, one
for future reference and one for parameter parsing.
In order to allow a greater command-line size, these
buffers should be dynamically allocated or marked
as init disposable buffers, so unused memory can be
released.
This patch renames the static saved_command_line
variable into boot_command_line adding __initdata
attribute, so that it can be disposed after
initialization. This rename is required so applications
that use saved_command_line will not be affected
by this change.
It reintroduces saved_command_line as dynamically
allocated buffer to match the data in boot_command_line.
It also mark secondary command-line buffer as __initdata,
and copies it to dynamically allocated static_command_line
buffer components may hold reference to it after
initialization.
This patch is for linux-2.6.18-rc5-mm1 and is divided to
target each architecture. I could not check this in any
architecture so please forgive me if I got it wrong.
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
---
--
VGER BF report: U 0.5
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 19/26] Dynamic kernel command-line - sh
2006-09-03 21:50 [PATCH 00/26] Dynamic kernel command-line Alon Bar-Lev
@ 2006-09-03 22:01 ` Alon Bar-Lev
0 siblings, 0 replies; 6+ messages in thread
From: Alon Bar-Lev @ 2006-09-03 22:01 UTC (permalink / raw)
To: Andi Kleen
Cc: Matt Domsch, Andrew Morton, linux-kernel, johninsd, davej, Riley,
trini, davem, ecd, jj, anton, wli, lethal, rc, spyro, rth, avr32,
hskinnemoen, starvik, ralf, matthew, grundler, geert, zippel,
paulus, schwidefsky, heiko.carstens, uclinux-v850, chris
1. Rename saved_command_line into boot_command_line.
2. Set command_line as __initdata.
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
---
diff -urNp linux-2.6.18-rc5-mm1.org/arch/sh/kernel/setup.c
linux-2.6.18-rc5-mm1/arch/sh/kernel/setup.c
--- linux-2.6.18-rc5-mm1.org/arch/sh/kernel/setup.c
2006-09-03 18:56:51.000000000 +0300
+++ linux-2.6.18-rc5-mm1/arch/sh/kernel/setup.c 2006-09-03
21:02:18.000000000 +0300
@@ -88,7 +88,7 @@ static struct sh_machine_vector* __init
#define RAMDISK_PROMPT_FLAG 0x8000
#define RAMDISK_LOAD_FLAG 0x4000
-static char command_line[COMMAND_LINE_SIZE] = { 0, };
+static char __initdata command_line[COMMAND_LINE_SIZE] = {
0, };
struct resource standard_io_resources[] = {
{ "dma1", 0x00, 0x1f },
@@ -125,8 +125,8 @@ static inline void parse_cmdline (char *
int len = 0;
/* Save unparsed command line copy for /proc/cmdline */
- memcpy(saved_command_line, COMMAND_LINE,
COMMAND_LINE_SIZE);
- saved_command_line[COMMAND_LINE_SIZE-1] = '\0';
+ memcpy(boot_command_line, COMMAND_LINE,
COMMAND_LINE_SIZE);
+ boot_command_line[COMMAND_LINE_SIZE-1] = '\0';
memory_start = (unsigned long)PAGE_OFFSET+__MEMORY_START;
memory_end = memory_start + __MEMORY_SIZE;
--
VGER BF report: U 0.499656
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-01-18 13:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200610112111.02040.alon.barlev@gmail.com>
[not found] ` <200610112117.10698.alon.barlev@gmail.com>
[not found] ` <200610112116.56120.alon.barlev@gmail.com>
2006-10-12 8:16 ` [PATCH 19/26] Dynamic kernel command-line - sh Paul Mundt
2006-10-12 8:30 ` Alon Bar-Lev
2007-01-18 12:58 [patch 00/26] Dynamic kernel command-line Bernhard Walle
2007-01-18 12:59 ` [patch 19/26] Dynamic kernel command-line - sh Bernhard Walle
-- strict thread matches above, loose matches on Subject: below --
2006-12-02 10:47 [PATCH 00/26] Dynamic kernel command-line Alon Bar-Lev
2006-12-02 10:55 ` [PATCH 19/26] Dynamic kernel command-line - sh Alon Bar-Lev
2006-09-03 22:15 [PATCH 00/26] Dynamic kernel command-line - Resend please ignore last Alon Bar-Lev
2006-09-03 22:22 ` [PATCH 19/26] Dynamic kernel command-line - sh Alon Bar-Lev
2006-09-03 21:50 [PATCH 00/26] Dynamic kernel command-line Alon Bar-Lev
2006-09-03 22:01 ` [PATCH 19/26] Dynamic kernel command-line - sh Alon Bar-Lev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox