Query about cyclic buffer size

Vivek Goyal vgoyal at redhat.com
Thu Sep 20 09:12:41 EDT 2012


On Thu, Sep 20, 2012 at 04:25:35PM +0900, Atsushi Kumagai wrote:
> Hello Vivek,
> 
> On Thu, 13 Sep 2012 10:10:18 -0400
> Vivek Goyal <vgoyal at redhat.com> 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.
> 
> > 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.

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

Thanks
Vivek



More information about the kexec mailing list