[rfc 1/2] [RFC] procfs: Add VmFlags field in smaps output

2012-10-22 Thread Cyrill Gorcunov
When we do restore VMA area after checkpoint we would like to know if the area was locked or say it had mergeable attribute, but at moment the kernel does not provide such information, thus we can't figure out if we should call mlock/madvise on VMA restore. This patch adds new VmFlags field to sma

Re: [RFC] procfs: Add VmFlags field in smaps output

2012-10-19 Thread Cyrill Gorcunov
On Fri, Oct 19, 2012 at 01:28:35AM +0400, Cyrill Gorcunov wrote: > > > > A common way in which we do this future-proofing is to display the info > > in name:value tuples (eg, /proc/meminfo). So userspace parses for the > > "name" rather than looking into a fixed position in the /proc output. > >

Re: [RFC] procfs: Add VmFlags field in smaps output

2012-10-18 Thread Cyrill Gorcunov
On Thu, Oct 18, 2012 at 02:02:59PM -0700, Andrew Morton wrote: > > +#ifdef CONFIG_CHECKPOINT_RESTORE > > +static void show_smap_vma_flags(struct seq_file *m, struct vm_area_struct > > *vma) > > +{ > > + seq_printf(m, > > + "VmFlags: %c%c%c%c%c%c%c%c%c\n", > > +

Re: [RFC] procfs: Add VmFlags field in smaps output

2012-10-18 Thread Andrew Morton
If yes, I would like to > > know if the output format provided below looks reasonable. > > > > Please review, thanks! > > --- > > Also I've had a bit different output format, not sure > which one is better. > --- > From: Cyrill Gorcunov > Subj

Re: [RFC] procfs: Add VmFlags field in smaps output

2012-10-18 Thread Cyrill Gorcunov
s reasonable. > > Please review, thanks! > --- Also I've had a bit different output format, not sure which one is better. --- From: Cyrill Gorcunov Subject: [RFC] procfs: Add VmFlags field in smaps output When we do restore VMA area after checkpoint we would like to know if the are

[RFC] procfs: Add VmFlags field in smaps output

2012-10-18 Thread Cyrill Gorcunov
VmFlags field in smaps output When we do restore VMA area after checkpoint we would like to know if the area was locked or say it has mergeable attribute, but at moment the kernel does not provide such information, thus we can't figure out if we should call mlock/madvise on VMA restore.