public inbox for kexec@lists.infradead.org
 help / color / mirror / Atom feed
* Query about cyclic buffer size
@ 2012-09-13 14:10 Vivek Goyal
  2012-09-20  7:25 ` Atsushi Kumagai
  0 siblings, 1 reply; 4+ messages in thread
From: Vivek Goyal @ 2012-09-13 14:10 UTC (permalink / raw)
  To: Atsushi Kumagai; +Cc: Dave Young, kexec, WANG Chao

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
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Query about cyclic buffer size
  2012-09-13 14:10 Query about cyclic buffer size Vivek Goyal
@ 2012-09-20  7:25 ` Atsushi Kumagai
  2012-09-20 13:12   ` Vivek Goyal
  0 siblings, 1 reply; 4+ messages in thread
From: Atsushi Kumagai @ 2012-09-20  7:25 UTC (permalink / raw)
  To: vgoyal; +Cc: kexec, dyoung, chaowang

Hello Vivek,

On Thu, 13 Sep 2012 10:10:18 -0400
Vivek Goyal <vgoyal@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.


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

Thanks
Atsushi kumagai

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Query about cyclic buffer size
  2012-09-20  7:25 ` Atsushi Kumagai
@ 2012-09-20 13:12   ` Vivek Goyal
  2012-10-02  4:55     ` Atsushi Kumagai
  0 siblings, 1 reply; 4+ messages in thread
From: Vivek Goyal @ 2012-09-20 13:12 UTC (permalink / raw)
  To: Atsushi Kumagai; +Cc: kexec, dyoung, chaowang

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@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

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Query about cyclic buffer size
  2012-09-20 13:12   ` Vivek Goyal
@ 2012-10-02  4:55     ` Atsushi Kumagai
  0 siblings, 0 replies; 4+ messages in thread
From: Atsushi Kumagai @ 2012-10-02  4:55 UTC (permalink / raw)
  To: vgoyal; +Cc: kexec, dyoung, chaowang

Hello Vivek,

On Thu, 20 Sep 2012 09:12:41 -0400
Vivek Goyal <vgoyal@redhat.com> wrote:
 
> > 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.

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
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-10-02  4:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-13 14:10 Query about cyclic buffer size Vivek Goyal
2012-09-20  7:25 ` Atsushi Kumagai
2012-09-20 13:12   ` Vivek Goyal
2012-10-02  4:55     ` Atsushi Kumagai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox