Skip to contentSkip to conversation

Query about cyclic buffer size

DISCUSSION Vivek Goyal 2 participants 4 messages Sep 13, 2012 – Oct 2, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Atsushi-san,

How is size of cyclic buffer decided with 1.5.0? In practice I don't think asking user for the size is a good idea as user does not know how much memory will be left after kernel boot.

Will it make sense for makedumpfile to automatically determine the buffer size based on amount of free memory available in the system. Something like use 70-80% of free memory as cyclic buffer.

Thanks
Vivek

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#1 lore raw

Hello Vivek,

Quoted 5 lines · On Thu, 13 Sep 2012 10:10:18 -0400 Vivek Goyal <[email protected]> wrote:

Hi Atsushi-san,

How is size of cyclic buffer decided with 1.5.0? In practice I don't think asking user for the size is a good idea as user does not know how much memory will be left after kernel boot.

As you said, I don't think asking user for the size is a smart way, either. So, I agree with your basic idea explained in below.

Quoted 3 lines

Will it make sense for makedumpfile to automatically determine the buffer size based on amount of free memory available in the system. Something like use 70-80% of free memory as cyclic buffer.

Now, I think makedumpfile should automatically choose the lesser of the two below as the size of cyclic buffer when the size isn't specified:

a. the size enough for storing the 1st/2nd bitmap for the whole of vmcore b. the limit size (e.g. 70-80% of free memory)

However, I don't have a good idea how to determine the appropriate size for the case of "b".
If someone have a idea for the limit size, please let me know.

By the way, I'll be on long vacation until Sep 30, so I can't reply.

Thanks
Atsushi kumagai

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#2 lore raw
Quoted 21 lines · Atsushi Kumagai

Hello Vivek,

Quoted 5 lines · On Thu, 13 Sep 2012 10:10:18 -0400 Vivek Goyal <[email protected]> wrote:

Hi Atsushi-san,

How is size of cyclic buffer decided with 1.5.0? In practice I don't think asking user for the size is a good idea as user does not know how much memory will be left after kernel boot.

As you said, I don't think asking user for the size is a smart way, either. So, I agree with your basic idea explained in below.

Quoted 3 lines

Will it make sense for makedumpfile to automatically determine the buffer size based on amount of free memory available in the system. Something like use 70-80% of free memory as cyclic buffer.

Now, I think makedumpfile should automatically choose the lesser of the two below as the size of cyclic buffer when the size isn't specified:

Quoted 6 lines

a. the size enough for storing the 1st/2nd bitmap for the whole of vmcore b. the limit size (e.g. 70-80% of free memory)

However, I don't have a good idea how to determine the appropriate size for the case of "b".
If someone have a idea for the limit size, please let me know.

May be just look at "free" output or "cat /proc/meminfo" and grep for "MemFree" calculate the size of buffer.

Thanks
Vivek

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

#3 lore raw

Hello Vivek,

Quoted 6 lines · On Thu, 20 Sep 2012 09:12:41 -0400 Vivek Goyal <[email protected]> wrote:
Quoted 6 lines

Now, I think makedumpfile should automatically choose the lesser of the two below as the size of cyclic buffer when the size isn't specified:

a. the size enough for storing the 1st/2nd bitmap for the whole of vmcore b. the limit size (e.g. 70-80% of free memory)

Quoted 6 lines
Quoted 3 lines

However, I don't have a good idea how to determine the appropriate size for the case of "b".
If someone have a idea for the limit size, please let me know.

May be just look at "free" output or "cat /proc/meminfo" and grep for "MemFree" calculate the size of buffer.

Thank you for your answer, but what I minded was to allocate most of free memory is safe or not.
But now, I think it may be safe because processes which need some memory will not be created while makedumpfile is running.

So, I will try to implement the above idea for v1.5.1. When I make the patch, I will post them.

Thanks
Atsushi Kumagai

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec