* [Patch] ipc: HARD_MSGMAX should be higher not lower on 64bit
@ 2009-12-11 6:10 Amerigo Wang
2009-12-11 14:44 ` Serge E. Hallyn
0 siblings, 1 reply; 4+ messages in thread
From: Amerigo Wang @ 2009-12-11 6:10 UTC (permalink / raw)
To: linux-kernel; +Cc: akpm, Serge E. Hallyn, Amerigo Wang, Cedric Le Goater
It looks weird that we have HARD_MSGMAX lower on 64bit than on 32bit,
since usually 64bit machines have more memory than 32bit machines.
Making it higher on 64bit seems reasonable, and keep the original
number on 32bit.
Cc: Serge E. Hallyn <serue@us.ibm.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: WANG Cong <amwang@redhat.com>
---
diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h
index e408722..07baa38 100644
--- a/include/linux/ipc_namespace.h
+++ b/include/linux/ipc_namespace.h
@@ -87,7 +87,7 @@ extern int mq_init_ns(struct ipc_namespace *ns);
/* default values */
#define DFLT_QUEUESMAX 256 /* max number of message queues */
#define DFLT_MSGMAX 10 /* max number of messages in each queue */
-#define HARD_MSGMAX (131072/sizeof(void *))
+#define HARD_MSGMAX (32768*sizeof(void *)/4)
#define DFLT_MSGSIZEMAX 8192 /* max message size */
#else
static inline int mq_init_ns(struct ipc_namespace *ns) { return 0; }
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [Patch] ipc: HARD_MSGMAX should be higher not lower on 64bit
2009-12-11 6:10 [Patch] ipc: HARD_MSGMAX should be higher not lower on 64bit Amerigo Wang
@ 2009-12-11 14:44 ` Serge E. Hallyn
2009-12-11 15:21 ` Américo Wang
0 siblings, 1 reply; 4+ messages in thread
From: Serge E. Hallyn @ 2009-12-11 14:44 UTC (permalink / raw)
To: Amerigo Wang; +Cc: linux-kernel, akpm, Cedric Le Goater
Quoting Amerigo Wang (amwang@redhat.com):
> It looks weird that we have HARD_MSGMAX lower on 64bit than on 32bit,
> since usually 64bit machines have more memory than 32bit machines.
It does look like this may have been an accident.
> Making it higher on 64bit seems reasonable, and keep the original
> number on 32bit.
>
> Cc: Serge E. Hallyn <serue@us.ibm.com>
> Cc: Cedric Le Goater <clg@fr.ibm.com>
> Signed-off-by: WANG Cong <amwang@redhat.com>
>
> ---
> diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h
> index e408722..07baa38 100644
> --- a/include/linux/ipc_namespace.h
> +++ b/include/linux/ipc_namespace.h
> @@ -87,7 +87,7 @@ extern int mq_init_ns(struct ipc_namespace *ns);
> /* default values */
> #define DFLT_QUEUESMAX 256 /* max number of message queues */
> #define DFLT_MSGMAX 10 /* max number of messages in each queue */
> -#define HARD_MSGMAX (131072/sizeof(void *))
> +#define HARD_MSGMAX (32768*sizeof(void *)/4)
why /4 ? You're now making it much smaller for 32-bit than it
used to be?
> #define DFLT_MSGSIZEMAX 8192 /* max message size */
> #else
> static inline int mq_init_ns(struct ipc_namespace *ns) { return 0; }
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [Patch] ipc: HARD_MSGMAX should be higher not lower on 64bit
2009-12-11 14:44 ` Serge E. Hallyn
@ 2009-12-11 15:21 ` Américo Wang
2009-12-11 16:11 ` Serge E. Hallyn
0 siblings, 1 reply; 4+ messages in thread
From: Américo Wang @ 2009-12-11 15:21 UTC (permalink / raw)
To: Serge E. Hallyn; +Cc: Amerigo Wang, linux-kernel, akpm, Cedric Le Goater
(Hi, I am the same person.)
On Fri, Dec 11, 2009 at 08:44:33AM -0600, Serge E. Hallyn wrote:
>Quoting Amerigo Wang (amwang@redhat.com):
>> It looks weird that we have HARD_MSGMAX lower on 64bit than on 32bit,
>> since usually 64bit machines have more memory than 32bit machines.
>
>It does look like this may have been an accident.
>
OK.
>> Making it higher on 64bit seems reasonable, and keep the original
>> number on 32bit.
>>
>> Cc: Serge E. Hallyn <serue@us.ibm.com>
>> Cc: Cedric Le Goater <clg@fr.ibm.com>
>> Signed-off-by: WANG Cong <amwang@redhat.com>
>>
>> ---
>> diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h
>> index e408722..07baa38 100644
>> --- a/include/linux/ipc_namespace.h
>> +++ b/include/linux/ipc_namespace.h
>> @@ -87,7 +87,7 @@ extern int mq_init_ns(struct ipc_namespace *ns);
>> /* default values */
>> #define DFLT_QUEUESMAX 256 /* max number of message queues */
>> #define DFLT_MSGMAX 10 /* max number of messages in each queue */
>> -#define HARD_MSGMAX (131072/sizeof(void *))
>> +#define HARD_MSGMAX (32768*sizeof(void *)/4)
>
>why /4 ? You're now making it much smaller for 32-bit than it
>used to be?
>
Yes?
Before this patch, it is 131072/sizeof(void*) = 32768;
after this patch, it is 32768*sizeof(void*)/4 = 32768 too.
Both on 32bit, of course.
Am I missing something?
--
Live like a child, think like the god.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Patch] ipc: HARD_MSGMAX should be higher not lower on 64bit
2009-12-11 15:21 ` Américo Wang
@ 2009-12-11 16:11 ` Serge E. Hallyn
0 siblings, 0 replies; 4+ messages in thread
From: Serge E. Hallyn @ 2009-12-11 16:11 UTC (permalink / raw)
To: Américo Wang; +Cc: Amerigo Wang, linux-kernel, akpm, Cedric Le Goater
Quoting Américo Wang (xiyou.wangcong@gmail.com):
>
> (Hi, I am the same person.)
>
> On Fri, Dec 11, 2009 at 08:44:33AM -0600, Serge E. Hallyn wrote:
> >Quoting Amerigo Wang (amwang@redhat.com):
> >> It looks weird that we have HARD_MSGMAX lower on 64bit than on 32bit,
> >> since usually 64bit machines have more memory than 32bit machines.
> >
> >It does look like this may have been an accident.
> >
>
> OK.
>
> >> Making it higher on 64bit seems reasonable, and keep the original
> >> number on 32bit.
> >>
> >> Cc: Serge E. Hallyn <serue@us.ibm.com>
> >> Cc: Cedric Le Goater <clg@fr.ibm.com>
> >> Signed-off-by: WANG Cong <amwang@redhat.com>
> >>
> >> ---
> >> diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h
> >> index e408722..07baa38 100644
> >> --- a/include/linux/ipc_namespace.h
> >> +++ b/include/linux/ipc_namespace.h
> >> @@ -87,7 +87,7 @@ extern int mq_init_ns(struct ipc_namespace *ns);
> >> /* default values */
> >> #define DFLT_QUEUESMAX 256 /* max number of message queues */
> >> #define DFLT_MSGMAX 10 /* max number of messages in each queue */
> >> -#define HARD_MSGMAX (131072/sizeof(void *))
> >> +#define HARD_MSGMAX (32768*sizeof(void *)/4)
> >
> >why /4 ? You're now making it much smaller for 32-bit than it
> >used to be?
> >
>
> Yes?
>
> Before this patch, it is 131072/sizeof(void*) = 32768;
> after this patch, it is 32768*sizeof(void*)/4 = 32768 too.
> Both on 32bit, of course.
>
> Am I missing something?
Haha, nope.
Acked-by: Serge Hallyn <serue@us.ibm.com>
thanks,
-serge
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-12-11 16:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-11 6:10 [Patch] ipc: HARD_MSGMAX should be higher not lower on 64bit Amerigo Wang
2009-12-11 14:44 ` Serge E. Hallyn
2009-12-11 15:21 ` Américo Wang
2009-12-11 16:11 ` Serge E. Hallyn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox