Re: [PATCH][mm][Fix] swsusp: fix counting of highmem pages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Sunday, 4 of December 2005 01:10, Pavel Machek wrote:
> > > Ah, okay, I see. As long as the include hack is gone, its okay with me.
> > 
> > All right.  Appended is the latest version.
> 
> Okay, seems I'll need to get latest mm version, because this changed a
> lot. Sorry, that will be tommorow afternoon.

OK

> > Signed-off-by: Rafael J. Wysocki <[email protected]>
> > 
> >  kernel/power/snapshot.c |   25 ++++++++++++++++++-------
> >  kernel/power/swsusp.c   |    3 ++-
> >  2 files changed, 20 insertions(+), 8 deletions(-)
> > 
> > Index: linux-2.6.15-rc3-mm1/kernel/power/snapshot.c
> > ===================================================================
> > --- linux-2.6.15-rc3-mm1.orig/kernel/power/snapshot.c	2005-12-03 00:14:49.000000000 +0100
> > +++ linux-2.6.15-rc3-mm1/kernel/power/snapshot.c	2005-12-04 00:35:14.000000000 +0100
> > @@ -37,6 +37,12 @@
> > @@ -52,13 +58,12 @@
> >  				if (!pfn_valid(pfn))
> >  					continue;
> >  				page = pfn_to_page(pfn);
> > -				if (PageReserved(page))
> > -					continue;
> > -				if (PageNosaveFree(page))
> > -					continue;
> > -				n++;
> > +				if (!PageNosaveFree(page) && !PageReserved(page))
> > +					n++;
> >  			}
> 
> As far as I can see, this does not change anything. Can you keep it
> out?

OK

> >  		}
> > +	if (n > 0)
> > +		n += (n * KMALLOC_SIZE + PAGE_SIZE - 1) / PAGE_SIZE + 1;
> >  	return n;
> >  }
> 
> Can't you just n += n/50 here? Playing with KMALLOC_SIZE knows way too
> much about memory allocation details.

I do the "n + n/50" later on, so I can just drop all of the above changes
if they are too complicated.

Greetings,
Rafael
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux