Re: [PATCH 2/3] swsusp: Do not use page flags

2007-03-20 Thread Rafael J. Wysocki
On Tuesday, 20 March 2007 01:31, Andrew Morton wrote: > On Mon, 12 Mar 2007 22:19:20 +0100 > "Rafael J. Wysocki" <[EMAIL PROTECTED]> wrote: > > > Make swsusp use memory bitmaps instead of page flags for marking 'nosave' > > and > > free pages. This allows us to 'recycle' two page flags that can

Re: [PATCH 2/3] swsusp: Do not use page flags

2007-03-20 Thread Pavel Machek
Hi! > > The patch is designed to minimize the amount of changes and there are some > > nice > > simplifications and optimizations possible on top of it. I am going to > > implement them separately in the future. > > Blows up with ia64 allmodconfig due to CONFIG_PM=y, CONFIG_SOFTWARE_SUSPEND=n:

Re: [PATCH 2/3] swsusp: Do not use page flags

2007-03-19 Thread Andrew Morton
On Mon, 12 Mar 2007 22:19:20 +0100 "Rafael J. Wysocki" <[EMAIL PROTECTED]> wrote: > Make swsusp use memory bitmaps instead of page flags for marking 'nosave' and > free pages. This allows us to 'recycle' two page flags that can be used for > other > purposes. Also, the memory needed to store th

Re: [PATCH 2/3] swsusp: Do not use page flags

2007-03-15 Thread Rafael J. Wysocki
On Thursday, 15 March 2007 23:23, Andrew Morton wrote: > On Thu, 15 Mar 2007 23:19:02 +0100 (CET) > Jiri Kosina <[EMAIL PROTECTED]> wrote: > > > On Thu, 15 Mar 2007, Andrew Morton wrote: > > > > > > > And why _does_ suspend use GFP_ATOMIC all over the place? > > > > Generally, because it cannot s

Re: [PATCH 2/3] swsusp: Do not use page flags

2007-03-15 Thread Pavel Machek
Hi! > > > > On Mon, 12 Mar 2007 22:19:20 +0100 "Rafael J. Wysocki" <[EMAIL > > > > PROTECTED]> wrote: > > > > +int create_basic_memory_bitmaps(void) > > > > +{ > > > > + struct memory_bitmap *bm1, *bm2; > > > > + int error = 0; > > > > + > > > > + BUG_ON(forbidden_pages_map || f

Re: [PATCH 2/3] swsusp: Do not use page flags

2007-03-15 Thread Andrew Morton
On Thu, 15 Mar 2007 23:19:02 +0100 (CET) Jiri Kosina <[EMAIL PROTECTED]> wrote: > On Thu, 15 Mar 2007, Andrew Morton wrote: > > > > > And why _does_ suspend use GFP_ATOMIC all over the place? > > > Generally, because it cannot sleep. > > Why not? > > I guess it's simply beucase of kswapd being a

Re: [PATCH 2/3] swsusp: Do not use page flags

2007-03-15 Thread Jiri Kosina
On Thu, 15 Mar 2007, Andrew Morton wrote: > > > And why _does_ suspend use GFP_ATOMIC all over the place? > > Generally, because it cannot sleep. > Why not? I guess it's simply beucase of kswapd being already frozen, so there is no chance that once GFP_KERNEL allocation goes to sleep, it is goin

Re: [PATCH 2/3] swsusp: Do not use page flags

2007-03-15 Thread Andrew Morton
On Thu, 15 Mar 2007 22:05:53 +0100 "Rafael J. Wysocki" <[EMAIL PROTECTED]> wrote: > On Thursday, 15 March 2007 20:08, Andrew Morton wrote: > > > On Mon, 12 Mar 2007 22:19:20 +0100 "Rafael J. Wysocki" <[EMAIL > > > PROTECTED]> wrote: > > > +int create_basic_memory_bitmaps(void) > > > +{ > > > + st

Re: [PATCH 2/3] swsusp: Do not use page flags

2007-03-15 Thread Rafael J. Wysocki
On Thursday, 15 March 2007 20:08, Andrew Morton wrote: > > On Mon, 12 Mar 2007 22:19:20 +0100 "Rafael J. Wysocki" <[EMAIL PROTECTED]> > > wrote: > > +int create_basic_memory_bitmaps(void) > > +{ > > + struct memory_bitmap *bm1, *bm2; > > + int error = 0; > > + > > + BUG_ON(forbidden_pages_ma

Re: [PATCH 2/3] swsusp: Do not use page flags

2007-03-15 Thread Andrew Morton
> On Mon, 12 Mar 2007 22:19:20 +0100 "Rafael J. Wysocki" <[EMAIL PROTECTED]> > wrote: > +int create_basic_memory_bitmaps(void) > +{ > + struct memory_bitmap *bm1, *bm2; > + int error = 0; > + > + BUG_ON(forbidden_pages_map || free_pages_map); > + > + bm1 = kzalloc(sizeof(struct mem

[PATCH 2/3] swsusp: Do not use page flags

2007-03-12 Thread Rafael J. Wysocki
From: Rafael J. Wysocki <[EMAIL PROTECTED]> Make swsusp use memory bitmaps instead of page flags for marking 'nosave' and free pages. This allows us to 'recycle' two page flags that can be used for other purposes. Also, the memory needed to store the bitmaps is allocated when necessary (ie. bef

Re: [RFC][PATCH 2/3] swsusp: Do not use page flags

2007-03-12 Thread Pavel Machek
Hi! > Make swsusp use memory bitmaps instead of page flags for marking 'nosave' and > free pages. This allows us to 'recycle' two page flags that can be used for > other > purposes. Also, the memory needed to store the bitmaps is allocated when > necessary (ie. before the suspend) and freed aft

[RFC][PATCH 2/3] swsusp: Do not use page flags

2007-03-11 Thread Rafael J. Wysocki
From: Rafael J. Wysocki <[EMAIL PROTECTED]> Make swsusp use memory bitmaps instead of page flags for marking 'nosave' and free pages. This allows us to 'recycle' two page flags that can be used for other purposes. Also, the memory needed to store the bitmaps is allocated when necessary (ie. bef